fix: language reactivity

This commit is contained in:
Maya 2025-07-25 22:53:45 +03:00
parent ecddeb7249
commit bb1715682a
No known key found for this signature in database
1 changed files with 30 additions and 26 deletions

View File

@ -146,6 +146,7 @@
</svelte:head> </svelte:head>
<!-- FIXME: if user resizes between desktop/mobile, highlight of page disappears (only shows on original size) --> <!-- FIXME: if user resizes between desktop/mobile, highlight of page disappears (only shows on original size) -->
{#key $locale}
<div <div
class="flex flex-col min-h-screen h-full w-full overflow-x-hidden" class="flex flex-col min-h-screen h-full w-full overflow-x-hidden"
ondrop={dropFiles} ondrop={dropFiles}
@ -168,7 +169,9 @@
<Layout.PageContent {children} /> <Layout.PageContent {children} />
<div style="display:none"> <div style="display:none">
{#each locales as locale} {#each locales as locale}
<a href={localizeHref(page.url.pathname, { locale })}>{locale}</a> <a href={localizeHref(page.url.pathname, { locale })}
>{locale}</a
>
{/each} {/each}
</div> </div>
@ -180,6 +183,7 @@
<Navbar.Mobile /> <Navbar.Mobile />
</div> </div>
</div> </div>
{/key}
<!-- Gradients placed here to prevent it overlapping in transitions --> <!-- Gradients placed here to prevent it overlapping in transitions -->
<Layout.Gradients /> <Layout.Gradients />