From 7314da256b7ab020a79e931ba269365081d697ef Mon Sep 17 00:00:00 2001 From: hailin Date: Tue, 22 Apr 2025 22:10:47 +0800 Subject: [PATCH] . --- components/utility/global-state.tsx | 7 +++---- components/utility/home-redirector.tsx | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/components/utility/global-state.tsx b/components/utility/global-state.tsx index c977118..a7b0c66 100644 --- a/components/utility/global-state.tsx +++ b/components/utility/global-state.tsx @@ -191,11 +191,10 @@ export const GlobalState: FC = ({ children }) => { const homePath = locale === defaultLocale ? "" : `/${locale}` const targetPath = `${homePath}/setup` - console.log("[global-state.tsx]-------------", targetPath) + // console.log("[global-state.tsx]-------------", targetPath) - setTimeout(() => { - router.push(targetPath) - }, 20 * 1000) // 20秒 = 20000毫秒 + + router.push(targetPath) // return router.push(`${homePath}/setup`) // return router.push(`/${locale}/setup`) diff --git a/components/utility/home-redirector.tsx b/components/utility/home-redirector.tsx index bee77db..2fcb3fe 100644 --- a/components/utility/home-redirector.tsx +++ b/components/utility/home-redirector.tsx @@ -17,7 +17,7 @@ export default function HomeRedirector() { const preferred = localStorage.getItem('preferred-language') const currentPath = window.location.pathname - console.log('[HomeRedirector] localStorage preferred:', preferred) + console.log('[HomeRedirector] localStorage preferred-language:', preferred) if (!preferred || !isValidLocale(preferred)) { return @@ -37,7 +37,7 @@ export default function HomeRedirector() { // console.log('[HomeRedirector] Redirecting to:', newPath) router.replace(newPath) } else { - console.log('[HomeRedirector] Skipping redirect.') + console.log('[HomeRedirector] Skipping redirect......') } }, [])