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