add toatification package

This commit is contained in:
HAM!DREZA
2024-05-27 21:38:06 +03:30
parent f234440d1a
commit 1e132b97db
13 changed files with 99 additions and 49 deletions
+3
View File
@@ -299,6 +299,8 @@
<script setup>
import { useToast } from 'vue-toastification'
const toast = useToast()
const {authUser} = useAuth();
async function logout(){
await useFetch('/api/auth/logout', {
@@ -306,6 +308,7 @@ async function logout(){
method : 'POST'
})
authUser.value = null;
toast.warning("از حساب کاربری خود خارج شدید")
return navigateTo('/')
}
</script>