fix routeer push on nav menu click

This commit is contained in:
pa
2025-11-05 23:12:46 +09:00
committed by Natsumi
parent ca862a1273
commit 6ad7052485
2 changed files with 15 additions and 8 deletions

View File

@@ -18,7 +18,7 @@ const routes = [
{ path: '/feed', name: 'feed', component: Feed },
{
path: '/friend-location',
name: 'friendLocation',
name: 'friend-location',
component: FriendLocation
},
{ path: '/game-log', name: 'game-log', component: GameLog },
@@ -53,9 +53,10 @@ export function initRouter(app) {
router.beforeEach((to, from) => {
if (to.path == '/') {
return { name: 'feed' };
router.push({ name: 'feed' });
return false;
}
if (to.path === '/social' || to.path === '/social/social') {
if (to.path === '/social') {
return false;
}
return true;