1 <script lang="ts" context="module">
6 }) => ({ props: { id } });
10 import { onDestroy } from 'svelte';
11 import { _ } from 'svelte-i18n';
12 import { getTopic } from '$lib/stores/topics';
13 import { disableTopicActions, enableTopicActions } from '$lib/stores/actions';
15 import Topic from '$lib/components/topic/topic.svelte';
16 import ErrorBlock from '$lib/components/error_block/error_block.svelte';
17 import Loader from '$lib/components/loader/loader.svelte';
21 $: store = getTopic(id);
22 $: topic = $store.data;
24 enableTopicActions(id);
25 onDestroy(() => disableTopicActions());
30 <title>{$_('loader.message')}, {$_('topic.title')}</title>
33 <title>{$_('error.generic.title')}, {$_('topic.title')}</title>
36 <title>{topic.title}, {$_('topic.title')}</title>
44 <ErrorBlock message={$_('topic.error.unavailable')} />