This commit is contained in:
hailin 2025-05-21 02:18:08 +08:00
parent dae44767fd
commit 9f99a02818
1 changed files with 3 additions and 1 deletions

View File

@ -85,7 +85,9 @@ export default function WorkspaceLayout({ children }: WorkspaceLayoutProps) {
setRedirected(true) // 设置标志,避免跳转重复
return router.push(`/${locale}/login`)
} else {
await fetchWorkspaceData(workspaceId)
if (!redirected){
await fetchWorkspaceData(workspaceId) // 如果有session则加载工作区数据
}
}
})()
}, [workspaceId, redirected])