Skip to content

Commit

Permalink
✨ Finished lesson 95.3
Browse files Browse the repository at this point in the history
  • Loading branch information
ahaywood committed May 14, 2023
1 parent d45ffef commit f8336f9
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { redirect } from "@sveltejs/kit";

export const load = async ({ parent }) => {
const { session } = await parent();

if (session) {
throw redirect(303, '/invoices')
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<slot><!-- optional fallback --></slot>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { redirect } from "@sveltejs/kit";

export const load = async ({ locals: { supabase } }) => {
await supabase.auth.signOut();
throw redirect(303, '/login')
}

0 comments on commit f8336f9

Please sign in to comment.