]> git.r.bdr.sh - rbdr/forum/blame - src/routes/g/[id].svelte
Add type definitions
[rbdr/forum] / src / routes / g / [id].svelte
CommitLineData
cac85db0 1<script lang="ts" context="module">
58f7d521 2 export const load = ({
cac85db0
RBR
3 page: {
4 params: { id }
5 }
58f7d521
RBR
6 }) => ({ props: { id } });
7</script>
8
cac85db0 9<script lang="ts">
58f7d521 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}