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