aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsecondl1ght <[email protected]>2022-08-16 10:57:55 -0600
committersecondl1ght <[email protected]>2022-08-16 10:57:55 -0600
commit43159f41602cb1502fabe240d30c5d5f87ce3581 (patch)
treee5aa15bf05297e409d089e16d6a5096381b37cba
parentcf4dc80dc041e6038dee068689971406ba51b2f6 (diff)
downloadcoinos-ui-43159f41602cb1502fabe240d30c5d5f87ce3581.tar.gz
coinos-ui-43159f41602cb1502fabe240d30c5d5f87ce3581.zip
wait on locale load to render app
-rw-r--r--src/routes/__layout.svelte9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/routes/__layout.svelte b/src/routes/__layout.svelte
index 158397c5..c5234c7d 100644
--- a/src/routes/__layout.svelte
+++ b/src/routes/__layout.svelte
@@ -1,3 +1,12 @@
+<script context="module">
+ import { waitLocale } from 'svelte-i18n'
+
+ export async function preload() {
+ // awaits for the loading of the 'en-US' and 'en' dictionaries
+ return waitLocale()
+ }
+</script>
+
<script>
import { SvelteToast } from '@zerodevx/svelte-toast';
import '../app.css';