]>
Commit | Line | Data |
---|---|---|
1 | <script lang="ts" context="module"> | |
2 | export const load = ({ | |
3 | params: { id } | |
4 | }) => ({ props: { id } }); | |
5 | </script> | |
6 | ||
7 | <script lang="ts"> | |
8 | import { _ } from 'svelte-i18n'; | |
9 | import Forum from '$lib/components/forum/forum.svelte'; | |
10 | import ErrorBlock from '$lib/components/error_block/error_block.svelte'; | |
11 | import Loader from '$lib/components/loader/loader.svelte'; | |
12 | ||
13 | export let id: string; | |
14 | ||
15 | import { forum } from '$lib/stores/forums'; | |
16 | $: response = forum(id, true); | |
17 | </script> | |
18 | ||
19 | <svelte:head> | |
20 | <title>{$_(`forum.name.${id}`)}, {$_('forum.forum')}</title> | |
21 | </svelte:head> | |
22 | ||
23 | {#if $response.loading} | |
24 | <Loader /> | |
25 | {/if} | |
26 | {#if $response.error} | |
27 | <ErrorBlock message={$_('forum.error.unavailable')} /> | |
28 | {/if} | |
29 | {#if $response.data} | |
30 | <Forum forum={$response.data} /> | |
31 | {/if} |