feat: add vue-toastification for alerting

This commit is contained in:
wancat authored and Lin, Hung-Shin committed 2023-11-14 10:45:24 +08:00
1 parent 2d0fffc8f4
commit d0e2a4125d
7 files changed
+58 -22

No files matched your search

+9 -1
View File
@@ -8,7 +8,12 @@ import { isLoggedIn } from './utils/auth'
const routes = [
{
path: '/',
redirect: '/game',
redirect: {
name: 'game',
params: {
questId: 'helloworld',
},
},
},
{
path: '/login',
@@ -55,6 +60,9 @@ router.beforeEach(async (to, from, next) => {
} else if (to.meta.requiresGuest && loggedIn) {
next({
name: 'game', // Or any default authenticated user route
params: {
questId: 'helloworld',
},
})
} else {
next() // Always call next() at the end