fix: redirect to login if no session on invite page

This commit is contained in:
Rotimi Best
2025-11-08 05:51:09 +01:00
parent 3d64e25b89
commit 9e4609dc7f
@@ -117,6 +117,14 @@
}
onMount(async () => {
// check if user has session, if not redirect to sign up with redirect back to this page
const {
data: { session }
} = await supabase.auth.getSession();
if (!session) {
return goto(`/login?redirect=${$page.url?.pathname || ''}`);
}
setTheme(data.currentOrg?.theme || '');
});