update Login

This commit is contained in:
Dede Fuji Abdul 2023-10-16 15:17:34 +07:00
parent d80e8d2b5a
commit b80bb344ea

View File

@ -26,7 +26,7 @@ export const useAuthStore = defineStore('auth', () => {
writeData('token', 'secret-token') writeData('token', 'secret-token')
dispatchNotification({ title: 'Berhasil', content: 'Login berhasil, selamat datang kembali!', type: 'success' }) dispatchNotification({ title: 'Berhasil', content: 'Login berhasil, selamat datang kembali!', type: 'success' })
// redirect to home page after login // redirect to home page after login
router.push('/home') window.location.reload()
} else { } else {
dispatchNotification({ title: 'Login Gagal', content: 'Username atau password salah', type: 'error' }) dispatchNotification({ title: 'Login Gagal', content: 'Username atau password salah', type: 'error' })
} }