From 5b719445888a6cf203ed4af98a5e273e39d9c755 Mon Sep 17 00:00:00 2001 From: wancat Date: Tue, 21 Nov 2023 23:23:20 +0800 Subject: [PATCH] fix: redirect to map on social login --- app/src/router.js | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/app/src/router.js b/app/src/router.js index 060af3f..76f8280 100644 --- a/app/src/router.js +++ b/app/src/router.js @@ -10,11 +10,9 @@ const routes = [ { path: '/', redirect: { - name: 'game', - params: { - questId: 'helloworld', - }, + name: 'register', }, + meta: { requiresGuest: true }, }, { path: '/login', @@ -66,13 +64,10 @@ router.beforeEach(async (to, from, next) => { }) } else if (to.meta.requiresGuest && loggedIn) { next({ - name: 'game', // Or any default authenticated user route - params: { - questId: 'helloworld', - }, + name: 'map', }) } else { - next() // Always call next() at the end + next() } })