add toatification package
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user