feat(*): Add basic site functionality including sign up, sign in and sign out

This commit is contained in:
Josh Creek
2024-04-29 20:18:18 +01:00
parent 6794580c01
commit 079ccad6ba
13 changed files with 644 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
<script lang="ts">
import { createEventDispatcher } from 'svelte';
const dispatch = createEventDispatcher();
function emitSignedOutEvent() {
dispatch('signedOut', {});
}
// Access the supabase client from the layout data
export let supabase: any;
async function signOut() {
// TODO use the error from the response
const { error } = await supabase.auth.signOut().then(() => {
emitSignedOutEvent();
});
}
</script>
<button on:click={signOut}>Sign Out</button>