Skip to content
This repository was archived by the owner on Aug 5, 2025. It is now read-only.

Fix missing initial state of updated store tutorial #477

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script>
import { page, navigating, updated } from '$app/stores';
import { page, navigating } from '$app/stores';
</script>

<nav>
Expand All @@ -17,13 +17,3 @@
</nav>

<slot />

{#if $updated}
<p class="toast">
A new version of the app is available

<button on:click={() => location.reload()}>
reload the page
</button>
</p>
{/if}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<script>
import { page, navigating, updated } from '$app/stores';
</script>

<nav>
<a href="/" aria-current={$page.url.pathname === '/'}>
home
</a>

<a href="/about" aria-current={$page.url.pathname === '/about'}>
about
</a>

{#if $navigating}
navigating to {$navigating.to.url.pathname}
{/if}
</nav>

<slot />

{#if $updated}
<p class="toast">
A new version of the app is available

<button on:click={() => location.reload()}>
reload the page
</button>
</p>
{/if}