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.
This commit is contained in:
Sebastian Martinez
2024-09-06 14:51:11 +02:00
parent 5b33e1ecd5
commit 0f5d13da7e
+1 -2
View File
@@ -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({