This commit is contained in:
hailin 2025-05-20 19:26:59 +08:00
parent 1be8ebb79d
commit 0f4730c226
2 changed files with 6 additions and 6 deletions

View File

@ -17,8 +17,8 @@ export default function ChangePasswordPage() {
useEffect(() => { useEffect(() => {
;(async () => { ;(async () => {
const supabaseClient = await supabase(); // Await the client creation //const supabaseClient = await supabase(); // Await the client creation
const session = (await supabaseClient.auth.getSession()).data.session const session = (await supabase.auth.getSession()).data.session
if (!session) { if (!session) {
// // 提取当前路径中的 locale 部分 // // 提取当前路径中的 locale 部分

View File

@ -96,8 +96,8 @@ export default function SetupPage() {
useEffect(() => { useEffect(() => {
;(async () => { ;(async () => {
const supabaseClient = await supabase(); // Await the client creation //const supabaseClient = await supabase(); // Await the client creation
const session = (await supabaseClient.auth.getSession()).data.session const session = (await supabase.auth.getSession()).data.session
if (!session) { if (!session) {
// 强制跳转到带有 locale 的 login 页面 // 强制跳转到带有 locale 的 login 页面
@ -152,8 +152,8 @@ export default function SetupPage() {
} }
const handleSaveSetupSetting = async () => { const handleSaveSetupSetting = async () => {
const supabaseClient = await supabase(); // Await the client creation //const supabaseClient = await supabase(); // Await the client creation
const session = (await supabaseClient.auth.getSession()).data.session const session = (await supabase.auth.getSession()).data.session
if (!session) { if (!session) {
// return router.push(`/${locale}/login`) // return router.push(`/${locale}/login`)
//return (`${homePath}/login`) //return (`${homePath}/login`)