]> git.r.bdr.sh - rbdr/forum/blame - src/routes/f/[id].svelte
Update sveltekit version
[rbdr/forum] / src / routes / f / [id].svelte
CommitLineData
58f7d521
RBR
1<script context="module">
2 export const load = ({
3 page: {
4 params: { id }
5 }
6 }) => ({ props: { id } });
7</script>
8
9<script>
10 import { _ } from 'svelte-i18n';
11 import Forum from '$/components/forum/forum.svelte';
12 import ErrorBlock from '$/components/error_block/error_block.svelte';
13 import Loader from '$/components/loader/loader.svelte';
14
15 export let id;
16
fcbbc496 17 import { getForum } from '$/stores/forums';
58f7d521
RBR
18 $: store = getForum(id);
19 $: forum = $store.data;
20</script>
21
22<svelte:head>
23 <title>{$_(`forum.name.${id}`)}, {$_('forum.forum')}</title>
24</svelte:head>
25
26{#if $store.loading}
27 <Loader />
28{/if}
29{#if $store.error}
30 <ErrorBlock message={$_('forum.error.unavailable')} />
31{/if}
32{#if forum}
33 <Forum {forum} />
34{/if}