Skip to content

Commit

Permalink
Remove double navigation on app load
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
sebastinez committed Sep 6, 2024
1 parent 5b33e1e commit 0f5d13d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import Home from "@app/views/Home.svelte";
const activeRouteStore = router.activeRouteStore;
void router.loadFromLocation();
onMount(async () => {
try {
Expand All @@ -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({
Expand Down

0 comments on commit 0f5d13d

Please sign in to comment.