From b63cf2e9cdba4dd4960aba61756bc2dca5666fa9 Mon Sep 17 00:00:00 2001
From: HsiangNianian <i@jyunko.cn>
Date: Thu, 12 Mar 2026 15:37:18 +0800
Subject: feat(ui): add initGameLifecycle

---
 packages/ui/src/pages/index.tsx | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

(limited to 'packages/ui/src/pages/index.tsx')

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">
-- 
cgit v1.2.3-70-g09d2

