1 <script lang="ts" context="module">
2 export const load = ({ params: { id } }) => ({ props: { id } });
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;
13 $: tagResponse = topicsForTag(id);
17 <title>{id}, {$_('tag.title')}</title>
20 {#if $tagResponse.loading}
23 {#if $tagResponse.error}
24 <ErrorBlock message={$_('tag.error.unavailable')} />
26 {#if $tagResponse.data}
27 <Tag topics={$tagResponse.data} tag={id} />