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`)