mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-16 02:39:41 +02:00
fix(matrix): wait for i18n to load before rendering
Prevents "Cannot format a message without first setting the initial locale" error by showing a loading state until svelte-i18n is ready. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
8804ab77a2
commit
7442b09471
1 changed files with 13 additions and 6 deletions
|
|
@ -25,13 +25,20 @@
|
|||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>{$t('app.name')}</title>
|
||||
<title>{$i18nLoading ? 'Matrix Chat' : $t('app.name')}</title>
|
||||
<meta name="description" content="Self-hosted Matrix chat client" />
|
||||
</svelte:head>
|
||||
|
||||
<div class="min-h-screen bg-background text-foreground">
|
||||
{@render children()}
|
||||
</div>
|
||||
{#if $i18nLoading}
|
||||
<!-- Loading state while i18n initializes -->
|
||||
<div class="min-h-screen bg-background flex items-center justify-center">
|
||||
<div class="animate-pulse text-muted-foreground">Laden...</div>
|
||||
</div>
|
||||
{:else}
|
||||
<div class="min-h-screen bg-background text-foreground">
|
||||
{@render children()}
|
||||
</div>
|
||||
|
||||
<!-- Global Toast notifications -->
|
||||
<ToastContainer />
|
||||
<!-- Global Toast notifications -->
|
||||
<ToastContainer />
|
||||
{/if}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue