From b6b95cb0d0ec0ae9043e2fd72aa4df1fc40c3a31 Mon Sep 17 00:00:00 2001 From: Trent Larson Date: Mon, 26 May 2025 16:29:10 -0600 Subject: [PATCH] remove unused redirect to start page (now that we're creating an ID up front) --- src/router/index.ts | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/src/router/index.ts b/src/router/index.ts index a3d4907f..0b9aa52b 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -2,35 +2,11 @@ import { createRouter, createWebHistory, createMemoryHistory, - NavigationGuardNext, RouteLocationNormalized, RouteRecordRaw, } from "vue-router"; -import { accountsDBPromise } from "../db/index"; import { logger } from "../utils/logger"; -/** - * - * @param to :RouteLocationNormalized - * @param from :RouteLocationNormalized - * @param next :NavigationGuardNext - */ -const enterOrStart = async ( - to: RouteLocationNormalized, - from: RouteLocationNormalized, - next: NavigationGuardNext, -) => { - // one of the few times we use accountsDBPromise directly; try to avoid more usage - const accountsDB = await accountsDBPromise; - const num_accounts = await accountsDB.accounts.count(); - - if (num_accounts > 0) { - next(); - } else { - next({ name: "start" }); - } -}; - const routes: Array = [ { path: "/account", @@ -216,7 +192,6 @@ const routes: Array = [ path: "/projects", name: "projects", component: () => import("../views/ProjectsView.vue"), - beforeEnter: enterOrStart, }, { path: "/quick-action-bvc",