aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/packages/ui/src/pages/index.tsx
diff options
context:
space:
mode:
authorNtskwK <natsukawa247@outlook.com>2026-03-30 17:28:40 +0800
committerNtskwK <natsukawa247@outlook.com>2026-03-30 17:28:40 +0800
commit0c689afe68792fafca67746b9ece2a06760c6069 (patch)
tree8d0feac4fec8c8ac06994f28949915d348eb3cc9 /packages/ui/src/pages/index.tsx
parent382dfc68f1ecb09f277f82b0b2e0b466e1c79d06 (diff)
parentc4dc0676d794bca2613be282867d369328ebf073 (diff)
downloadDropOut-0c689afe68792fafca67746b9ece2a06760c6069.tar.gz
DropOut-0c689afe68792fafca67746b9ece2a06760c6069.zip
Merge branch 'main' of https://github.com/HydroRoll-Team/DropOut into chore/docs
Diffstat (limited to 'packages/ui/src/pages/index.tsx')
-rw-r--r--packages/ui/src/pages/index.tsx22
1 files changed, 8 insertions, 14 deletions
diff --git a/packages/ui/src/pages/index.tsx b/packages/ui/src/pages/index.tsx
index b93bb9b..d12646b 100644
--- a/packages/ui/src/pages/index.tsx
+++ b/packages/ui/src/pages/index.tsx
@@ -5,13 +5,11 @@ 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();
@@ -19,15 +17,7 @@ export function IndexPage() {
authStore.init();
settingsStore.refresh();
instanceStore.refresh();
- void initGameLifecycle().catch((error) => {
- console.error("Failed to initialize game lifecycle:", error);
- });
- }, [
- authStore.init,
- settingsStore.refresh,
- instanceStore.refresh,
- initGameLifecycle,
- ]);
+ }, [authStore.init, settingsStore.refresh, instanceStore.refresh]);
return (
<div className="relative h-screen w-full overflow-hidden bg-background font-sans">
@@ -55,8 +45,6 @@ export function IndexPage() {
<div className="absolute inset-0 opacity-100 bg-linear-to-br from-emerald-100 via-gray-100 to-indigo-100"></div>
)}
- {location.pathname === "/" && <ParticleBackground />}
-
<div className="absolute inset-0 bg-linear-to-t from-zinc-900 via-transparent to-black/50 dark:from-zinc-900 dark:to-black/50"></div>
</>
)}
@@ -81,7 +69,13 @@ export function IndexPage() {
<Sidebar />
<main className="size-full overflow-hidden">
- <Outlet />
+ {location.pathname === "/" ? (
+ <ParticleBackground>
+ <Outlet />
+ </ParticleBackground>
+ ) : (
+ <Outlet />
+ )}
</main>
</div>
</div>