This commit is contained in:
hailin 2025-04-22 22:10:47 +08:00
parent de1faa3d27
commit 7314da256b
2 changed files with 5 additions and 6 deletions

View File

@ -191,11 +191,10 @@ export const GlobalState: FC<GlobalStateProps> = ({ 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`)

View File

@ -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......')
}
}, [])