]> git.r.bdr.sh - rbdr/forum/blame_incremental - src/routes/g/[id].svelte
Don't remember what this WIP was about
[rbdr/forum] / src / routes / g / [id].svelte
... / ...
CommitLineData
1<script lang="ts" context="module">
2 export const load = ({ params: { id } }) => ({ props: { id } });
3</script>
4
5<script lang="ts">
6 import { _ } from 'svelte-i18n';
7 import { topicsForTag } from '$lib/stores/topics';
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';
11 export let id: string;
12
13 $: tagResponse = topicsForTag(id);
14</script>
15
16<svelte:head>
17 <title>{id}, {$_('tag.title')}</title>
18</svelte:head>
19
20{#if $tagResponse.loading}
21 <Loader />
22{/if}
23{#if $tagResponse.error}
24 <ErrorBlock message={$_('tag.error.unavailable')} />
25{/if}
26{#if $tagResponse.data}
27 <Tag topics={$tagResponse.data} tag={id} />
28{/if}