Files
homepage/src/routes/[cospendRoot=cospendRoot]/+error.svelte
T
Alexander fbd09fbdae refactor(errors): redesign error pages in editorial style
Replace the emoji/gradient card with an editorial layout: small lucide
glyph, oversized error code, hairline-divided serif bible quote.

Extract shared ErrorView + SectionError components and a bilingual
string helper. Add +error.svelte at each section root (faith, recipes,
fitness, tasks, cospend) so errors render inside the correct layout and
inherit the section-specific header/nav. Catch-all [...rest]/+page.ts
stubs route unmatched URLs through the section layout so the right
error page catches them.
2026-04-20 19:54:33 +02:00

15 lines
427 B
Svelte

<script lang="ts">
import { page } from '$app/stores';
import SectionError from '$lib/components/SectionError.svelte';
import { detectCospendLang, cospendRoot } from '$lib/js/cospendI18n';
let lang = $derived(detectCospendLang($page.url.pathname));
let isEnglish = $derived(lang === 'en');
</script>
<SectionError
sectionHref={cospendRoot(lang)}
sectionLabel={{ en: 'Expenses', de: 'Kosten' }}
{isEnglish}
/>