From 7fac17f189c5dc3d73028aa81b8a83f71c689111 Mon Sep 17 00:00:00 2001 From: Wang Guan Date: Tue, 22 Oct 2024 20:57:58 +0900 Subject: [PATCH] fix --- app/components/home.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/components/home.tsx b/app/components/home.tsx index 4b731c634..92ee35b7e 100644 --- a/app/components/home.tsx +++ b/app/components/home.tsx @@ -28,6 +28,7 @@ import { useAppConfig } from "../store/config"; import { AuthPage } from "./auth"; import { getClientConfig } from "../config/client"; import { type ClientApi, getClientApi } from "../client/api"; +import { useAccessStore } from "../store"; import { useSyncStore } from "../store/sync"; import { showToast } from "./ui-lib"; import Locale from "@/app/locales"; @@ -159,7 +160,6 @@ function useSyncOnStart() { if (!(running && syncStore.cloudSync() && syncStore.autoSync.onStart)) { return; } - console.debug("wtf", syncStore.autoSync, syncStore.cloudSync()); const dismissSyncingToast = showToast(Locale.Settings.Sync.IsSyncing); try { await syncStore.sync(); @@ -254,8 +254,10 @@ export function Home() { useSwitchTheme(); useLoadData(); useHtmlLang(); + useEffect(() => { console.log("[Config] got config from build time", getClientConfig()); + useAccessStore.getState().fetch(); }, []); if (!useHasHydrated()) {