diff options
| author | 2026-03-12 15:37:18 +0800 | |
|---|---|---|
| committer | 2026-03-12 15:37:18 +0800 | |
| commit | b63cf2e9cdba4dd4960aba61756bc2dca5666fa9 (patch) | |
| tree | fca439b63bb6b9c7a94c977e6bd115775b914b39 /packages | |
| parent | ecdb682fd854e7deb65572bd003fe423fdc8a795 (diff) | |
| download | DropOut-b63cf2e9cdba4dd4960aba61756bc2dca5666fa9.tar.gz DropOut-b63cf2e9cdba4dd4960aba61756bc2dca5666fa9.zip | |
feat(ui): add initGameLifecycle
Diffstat (limited to 'packages')
| -rw-r--r-- | packages/ui/src/pages/index.tsx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/ui/src/pages/index.tsx b/packages/ui/src/pages/index.tsx index 093ccb2..db08acc 100644 --- a/packages/ui/src/pages/index.tsx +++ b/packages/ui/src/pages/index.tsx @@ -5,11 +5,13 @@ import { Sidebar } from "@/components/sidebar"; import { useAuthStore } from "@/models/auth"; import { useInstanceStore } from "@/models/instance"; import { useSettingsStore } from "@/models/settings"; +import { useGameStore } from "@/stores/game-store"; export function IndexPage() { const authStore = useAuthStore(); const settingsStore = useSettingsStore(); const instanceStore = useInstanceStore(); + const initGameLifecycle = useGameStore((state) => state.initLifecycle); const location = useLocation(); @@ -17,7 +19,8 @@ export function IndexPage() { authStore.init(); settingsStore.refresh(); instanceStore.refresh(); - }, [authStore.init, settingsStore.refresh, instanceStore.refresh]); + initGameLifecycle(); + }, [authStore.init, settingsStore.refresh, instanceStore.refresh, initGameLifecycle]); return ( <div className="relative h-screen w-full overflow-hidden bg-background font-sans"> |