This commit is contained in:
hailin 2025-04-22 20:49:58 +08:00
parent d47b1d0932
commit de1faa3d27
1 changed files with 6 additions and 3 deletions

View File

@ -187,11 +187,14 @@ export const GlobalState: FC<GlobalStateProps> = ({ children }) => {
setProfile(profile)
if (!profile.has_onboarded) {
// 强制跳转到带有 locale 的 setup 页面
console.log("[global-state.tsx]-------------", `${homePath}/setup`)
// 修正 homePath 拼接逻辑,避免 //setup 问题
const homePath = locale === defaultLocale ? "" : `/${locale}`
const targetPath = `${homePath}/setup`
console.log("[global-state.tsx]-------------", targetPath)
setTimeout(() => {
router.push(`${homePath}/setup`)
router.push(targetPath)
}, 20 * 1000) // 20秒 = 20000毫秒
// return router.push(`${homePath}/setup`)