From 0f4730c22610403c79df0e97672e9617dea643b6 Mon Sep 17 00:00:00 2001 From: hailin Date: Tue, 20 May 2025 19:26:59 +0800 Subject: [PATCH] . --- chatdesk-ui/app/[locale]/login/password/page.tsx | 4 ++-- chatdesk-ui/app/[locale]/setup/page.tsx | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/chatdesk-ui/app/[locale]/login/password/page.tsx b/chatdesk-ui/app/[locale]/login/password/page.tsx index 6501202..07bcba4 100644 --- a/chatdesk-ui/app/[locale]/login/password/page.tsx +++ b/chatdesk-ui/app/[locale]/login/password/page.tsx @@ -17,8 +17,8 @@ export default function ChangePasswordPage() { useEffect(() => { ;(async () => { - const supabaseClient = await supabase(); // Await the client creation - const session = (await supabaseClient.auth.getSession()).data.session + //const supabaseClient = await supabase(); // Await the client creation + const session = (await supabase.auth.getSession()).data.session if (!session) { // // 提取当前路径中的 locale 部分 diff --git a/chatdesk-ui/app/[locale]/setup/page.tsx b/chatdesk-ui/app/[locale]/setup/page.tsx index 056ce65..577bad8 100644 --- a/chatdesk-ui/app/[locale]/setup/page.tsx +++ b/chatdesk-ui/app/[locale]/setup/page.tsx @@ -96,8 +96,8 @@ export default function SetupPage() { useEffect(() => { ;(async () => { - const supabaseClient = await supabase(); // Await the client creation - const session = (await supabaseClient.auth.getSession()).data.session + //const supabaseClient = await supabase(); // Await the client creation + const session = (await supabase.auth.getSession()).data.session if (!session) { // 强制跳转到带有 locale 的 login 页面 @@ -152,8 +152,8 @@ export default function SetupPage() { } const handleSaveSetupSetting = async () => { - const supabaseClient = await supabase(); // Await the client creation - const session = (await supabaseClient.auth.getSession()).data.session + //const supabaseClient = await supabase(); // Await the client creation + const session = (await supabase.auth.getSession()).data.session if (!session) { // return router.push(`/${locale}/login`) //return (`${homePath}/login`)