From 0f5d13da7e390fd9f05ad6b228420c7214c6e54d Mon Sep 17 00:00:00 2001 From: Sebastian Martinez Date: Fri, 6 Sep 2024 13:25:55 +0200 Subject: [PATCH] Remove double navigation on app load We where navigating to the `home` route twice on load. Once with `router.loadFromLocation` and then during `onMount` with `navigate("home")` which triggered the repo listing twice. --- src/App.svelte | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/App.svelte b/src/App.svelte index 73d3942..7ad7ddd 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -11,7 +11,6 @@ import Home from "@app/views/Home.svelte"; const activeRouteStore = router.activeRouteStore; - void router.loadFromLocation(); onMount(async () => { try { @@ -21,7 +20,7 @@ await invoke("authenticate"); } - void router.push({ resource: "home" }); + void router.loadFromLocation(); // eslint-disable-next-line @typescript-eslint/no-explicit-any } catch (e: any) { void router.push({