Files
maaw/components/UserAccount/UserAccountSignout.client.vue
Michael Dausmann a7f8c37f99 prettier fixes #16
2023-10-24 21:18:03 +11:00

20 lines
430 B
Vue

<script setup lang="ts">
const supabase = useSupabaseAuthClient();
const accountStore = useAccountStore();
onMounted(async () => {
await accountStore.init();
});
async function signout() {
await supabase.auth.signOut();
if (accountStore) {
accountStore.signout();
}
navigateTo('/', { replace: true });
}
</script>
<template>
<a href="#" @click.prevent="signout()">Signout</a>
</template>