This commit is contained in:
parent
1be8ebb79d
commit
0f4730c226
|
|
@ -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 部分
|
||||
|
|
|
|||
|
|
@ -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`)
|
||||
|
|
|
|||
Loading…
Reference in New Issue