Skip to content

Commit

Permalink
nav_to
Browse files Browse the repository at this point in the history
  • Loading branch information
try0 committed Jul 19, 2023
1 parent c18cd59 commit 6708219
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions spa-example/src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
import { page } from '$app/stores';
import { onMount } from 'svelte';
onMount(() => {
const navigateToPath = $page.url.searchParams.get("nav_to");
if (navigateToPath) {
goto(navigateToPath);
}
});
</script>

Expand Down

0 comments on commit 6708219

Please sign in to comment.