Merge branch 'main' of https://github.com/classroomio/classroomio into feat/release-v2
This commit is contained in:
@@ -110,6 +110,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 || '');
|
||||
setCurOrg(data.currentOrg as CurrentOrg);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user