Skip to content

Commit

Permalink
login error use router (epicmaxco#897)
Browse files Browse the repository at this point in the history
  • Loading branch information
bijankhazaei authored Jan 6, 2023
1 parent 5a3204f commit 7030841
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pages/auth/login/Login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
const keepLoggedIn = ref(false)
const emailErrors = ref<string[]>([])
const passwordErrors = ref<string[]>([])
const router = useRouter()
const formReady = computed(() => !emailErrors.value.length && !passwordErrors.value.length)
Expand All @@ -51,6 +52,6 @@
emailErrors.value = email.value ? [] : ['Email is required']
passwordErrors.value = password.value ? [] : ['Password is required']
useRouter().push({ name: 'dashboard' })
router.push({ name: 'dashboard' })
}
</script>

0 comments on commit 7030841

Please sign in to comment.