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