We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 75814a2 commit 5cb6ebcCopy full SHA for 5cb6ebc
content/tutorial/03-sveltekit/08-stores/03-updated-store/app-b/src/routes/+layout.svelte
@@ -0,0 +1,29 @@
1
+<script>
2
+ import { page, navigating, updated } from '$app/stores';
3
+</script>
4
+
5
+<nav>
6
+ <a href="/" aria-current={$page.url.pathname === '/'}>
7
+ home
8
+ </a>
9
10
+ <a href="/about" aria-current={$page.url.pathname === '/about'}>
11
+ about
12
13
14
+ {#if $navigating}
15
+ navigating to {$navigating.to.url.pathname}
16
+ {/if}
17
+</nav>
18
19
+<slot />
20
21
+{#if $updated}
22
+ <p class="toast">
23
+ A new version of the app is available
24
25
+ <button on:click={() => location.reload()}>
26
+ reload the page
27
+ </button>
28
+ </p>
29
+{/if}
0 commit comments