This commit is contained in:
parent
49a5f0f1dd
commit
cf6b20f4a5
|
|
@ -31,18 +31,6 @@ export default async function Login({
|
||||||
const localeString = locale;
|
const localeString = locale;
|
||||||
const { t, resources } = await initTranslations(localeString, ['translation']);
|
const { t, resources } = await initTranslations(localeString, ['translation']);
|
||||||
|
|
||||||
// const supabase = createServerClient<Database>(
|
|
||||||
// getRuntimeEnv("SUPABASE_URL") ?? "http://localhost:8000",
|
|
||||||
// process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!,
|
|
||||||
// {
|
|
||||||
// cookies: {
|
|
||||||
// get(name: string) {
|
|
||||||
// return cookieStore.get(name)?.value
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// )
|
|
||||||
|
|
||||||
const supabase = getSupabaseServerClient()
|
const supabase = getSupabaseServerClient()
|
||||||
|
|
||||||
const session = (await supabase.auth.getSession()).data.session
|
const session = (await supabase.auth.getSession()).data.session
|
||||||
|
|
@ -57,10 +45,16 @@ export default async function Login({
|
||||||
.eq("is_home", true)
|
.eq("is_home", true)
|
||||||
.maybeSingle();
|
.maybeSingle();
|
||||||
|
|
||||||
|
// Define the clearCookies function
|
||||||
const clearCookies = async () => {
|
const clearCookies = async () => {
|
||||||
await fetch("/api/clearCookies", {
|
const storedUrl = localStorage.getItem("supabaseUrl");
|
||||||
method: "POST",
|
if (storedUrl) {
|
||||||
});
|
await fetch(`${storedUrl}/api/clearcookies`, {
|
||||||
|
method: "POST",
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
console.error("Supabase URL is not stored in localStorage");
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!homeWorkspace) {
|
if (!homeWorkspace) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue