Files
timmal/app/components/ui/logout.vue
Lucien Cartier-Tilet 40ae2145cc
All checks were successful
ci / ci (push) Successful in 16m22s
feat: authentication with OAuth
2025-12-12 03:08:52 +01:00

19 lines
493 B
Vue
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<template>
<UButton color="neutral" variant="ghost" icon="i-lucide-log-out" size="xl" @click="onLogout"> Log Out </UButton>
</template>
<script setup lang="ts">
const { logout } = useAuth();
const toast = useToast();
const onLogout = () => {
logout();
navigateTo('/');
toast.add({
title: 'Successfully logged out!',
description: 'You successfully logged out of your account and have been taken back to the websites welcome page.',
color: 'success',
});
};
</script>