diff --git a/src/router/index.ts b/src/router/index.ts index 0df38a8220..6e51c37589 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -5,6 +5,8 @@ import { setupLayouts } from 'virtual:generated-layouts'; // @ts-ignore import routes from '~pages'; +let once = false; + const router = createRouter({ history: createWebHistory(import.meta.env.BASE_URL), routes: [...setupLayouts(routes)], @@ -13,8 +15,9 @@ const router = createRouter({ //update current blockchain router.beforeEach((to) => { console.log(to); - if (to.path === '/') { + if (to.path === '/' && !once) { window.location.replace('/nibiru'); + once = true; } const { chain } = to.params;