mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 12:09:51 +02:00
fix: initialize Tankopedia with model definitions for improved data handling
This commit is contained in:
1 parent
d8f9a2633d
commit
1b398a5f66
1 file changed
+7
@@ -17,6 +17,7 @@ import {
|
|||||||
TankSearch,
|
TankSearch,
|
||||||
type TankSearchProps,
|
type TankSearchProps,
|
||||||
} from "../../../components/TankSearch";
|
} from "../../../components/TankSearch";
|
||||||
|
import { awaitableModelDefinitions } from "../../../core/awaitables/modelDefinitions";
|
||||||
import { curateMixer } from "../../../core/blitzkit/curateMixer";
|
import { curateMixer } from "../../../core/blitzkit/curateMixer";
|
||||||
import {
|
import {
|
||||||
LocaleProvider,
|
LocaleProvider,
|
||||||
@@ -24,8 +25,13 @@ import {
|
|||||||
type LocaleAcceptorProps,
|
type LocaleAcceptorProps,
|
||||||
} from "../../../hooks/useLocale";
|
} from "../../../hooks/useLocale";
|
||||||
import { Mixer } from "../../../stores/mixer";
|
import { Mixer } from "../../../stores/mixer";
|
||||||
|
import { Tankopedia } from "../../../stores/tankopedia";
|
||||||
import type { MaybeSkeletonComponentProps } from "../../../types/maybeSkeletonComponentProps";
|
import type { MaybeSkeletonComponentProps } from "../../../types/maybeSkeletonComponentProps";
|
||||||
|
|
||||||
|
const modelDefinition = await awaitableModelDefinitions.then(
|
||||||
|
({ models }) => models[1]
|
||||||
|
);
|
||||||
|
|
||||||
export function Page({
|
export function Page({
|
||||||
locale,
|
locale,
|
||||||
skeleton,
|
skeleton,
|
||||||
@@ -33,6 +39,7 @@ export function Page({
|
|||||||
const initial = useRef(curateMixer());
|
const initial = useRef(curateMixer());
|
||||||
|
|
||||||
Mixer.useInitialization(initial.current);
|
Mixer.useInitialization(initial.current);
|
||||||
|
Tankopedia.useInitialization(modelDefinition);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<PageWrapper color="gray" p="0" maxWidth="unset">
|
<PageWrapper color="gray" p="0" maxWidth="unset">
|
||||||
|
|||||||
Reference in new issue
Block a user