]> git.r.bdr.sh - rbdr/forum/blob - src/routes/f/[id].svelte
Don't remember what this WIP was about
[rbdr/forum] / src / routes / f / [id].svelte
1 <script lang="ts" context="module">
2 export const load = ({ params: { id } }) => ({ props: { id } });
3 </script>
4
5 <script lang="ts">
6 import { _ } from 'svelte-i18n';
7 import Forum from '$lib/components/forum/forum.svelte';
8 import ErrorBlock from '$lib/components/error_block/error_block.svelte';
9 import Loader from '$lib/components/loader/loader.svelte';
10
11 export let id: string;
12
13 import { forum } from '$lib/stores/forums';
14 $: response = forum(id, true);
15 </script>
16
17 <svelte:head>
18 <title>{$_(`forum.name.${id}`)}, {$_('forum.forum')}</title>
19 </svelte:head>
20
21 {#if $response.loading}
22 <Loader />
23 {/if}
24 {#if $response.error}
25 <ErrorBlock message={$_('forum.error.unavailable')} />
26 {/if}
27 {#if $response.data}
28 <Forum forum={$response.data} />
29 {/if}