diff --git a/frontend/src/App.svelte b/frontend/src/App.svelte index 324a90b..5dc5584 100644 --- a/frontend/src/App.svelte +++ b/frontend/src/App.svelte @@ -203,13 +203,22 @@ view = 'public-home'; } + // Bumped every time goHome / goPublicHome is invoked. Home.svelte + // watches it via a $effect and re-loads when it changes. This makes + // clicking the wordmark or "Min liste" while ALREADY on /hjem or / + // refresh the list — without it, pushUrl is a no-op (same path) and + // view = 'home' is a no-op (same value), so nothing happened before. + let reloadKey = $state(0); + function goHome() { pushUrl('/hjem'); + reloadKey++; view = 'home'; } function goPublicHome() { pushUrl('/'); + reloadKey++; view = 'public-home'; } @@ -261,7 +270,7 @@ {:else if view === 'permalink'} {:else if view === 'public-home'} - + {:else if view === 'login'} {:else} - + {/if}