]> git.r.bdr.sh - rbdr/forum/blame - src/routes/g/[id].svelte
Update / use typescript
[rbdr/forum] / src / routes / g / [id].svelte
CommitLineData
58f7d521
RBR
1<script context="module">
2 export const load = ({
3 page: {
4 params: { id }
5 }
6 }) => ({ props: { id } });
7</script>
8
9<script>
10 import { _ } from 'svelte-i18n';
a7cf03c1
RBR
11 import { getTag } from '$lib/stores/tags';
12 import ErrorBlock from '$lib/components/error_block/error_block.svelte';
13 import Loader from '$lib/components/loader/loader.svelte';
14 import Tag from '$lib/components/tag/tag.svelte';
58f7d521
RBR
15 export let id;
16
17 $: store = getTag(id);
18 $: tag = $store.data;
19</script>
20
21<svelte:head>
22 <title>{id}, {$_('tag.title')}</title>
23</svelte:head>
24
25{#if $store.loading}
26 <Loader />
27{/if}
28{#if $store.error}
29 <ErrorBlock message={$_('tag.error.unavailable')} />
30{/if}
31{#if tag}
32 <Tag {tag} />
33{/if}