This repository has been archived on 2026-08-10. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
drizzli/src/routes/+page.svelte
T
2026-08-01 16:36:04 +02:00

17 lines
586 B
Svelte

<script lang="ts">
import { onMount } from 'svelte';
import { goto } from '$app/navigation';
import { localizeHref } from '$lib/paraglide/runtime';
// Deliberately a client-side redirect, not one from `load`: this page is
// prerendered, so a redirect resolved at build time would bake in the base
// locale and every visitor would land on English. Deciding it here lets the
// locale strategy read the URL, the cookie and finally the browser's own
// languages before choosing.
onMount(() => {
goto(localizeHref('/weather/week/'), { replaceState: true });
});
</script>