]>
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'; |
852ee620 | 7 | import { topicsForTag } from '$lib/stores/topics'; |
a7cf03c1 RBR |
8 | import ErrorBlock from '$lib/components/error_block/error_block.svelte'; |
9 | import Loader from '$lib/components/loader/loader.svelte'; | |
10 | import Tag from '$lib/components/tag/tag.svelte'; | |
be1ce532 | 11 | export let id: string; |
58f7d521 | 12 | |
852ee620 | 13 | $: tagResponse = topicsForTag(id); |
58f7d521 RBR |
14 | </script> |
15 | ||
16 | <svelte:head> | |
17 | <title>{id}, {$_('tag.title')}</title> | |
18 | </svelte:head> | |
19 | ||
852ee620 | 20 | {#if $tagResponse.loading} |
58f7d521 RBR |
21 | <Loader /> |
22 | {/if} | |
852ee620 | 23 | {#if $tagResponse.error} |
58f7d521 RBR |
24 | <ErrorBlock message={$_('tag.error.unavailable')} /> |
25 | {/if} | |
852ee620 RBR |
26 | {#if $tagResponse.data} |
27 | <Tag topics={$tagResponse.data} tag={id} /> | |
58f7d521 | 28 | {/if} |