]> git.r.bdr.sh - rbdr/forum/blame_incremental - src/routes/g/[id].svelte
Use tailwind, reference types
[rbdr/forum] / src / routes / g / [id].svelte
... / ...
CommitLineData
1<script lang="ts" context="module">
2 export const load = ({
3 page: {
4 params: { id }
5 }
6 }) => ({ props: { id } });
7</script>
8
9<script lang="ts">
10 import { _ } from 'svelte-i18n';
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';
15 export let id: string;
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}