This commit is contained in:
hailin 2025-05-20 18:40:19 +08:00
parent 17c59dbb91
commit 11257206d4
1 changed files with 2 additions and 1 deletions

View File

@ -74,7 +74,8 @@ export default function WorkspaceLayout({ children }: WorkspaceLayoutProps) {
useEffect(() => {
;(async () => {
const session = (await supabase.auth.getSession()).data.session
const supabaseClient = await supabase(); // Await the client creation
const session = (await supabaseClient.auth.getSession()).data.session
if (!session) {
// 跳转到带有 locale 的登录页面