1 <script context="module">
6 }) => ({ props: { id } });
10 import { onDestroy } from 'svelte';
11 import { _ } from 'svelte-i18n';
12 import { getTopic } from '$/stores/topics';
13 import { disableTopicActions, enableTopicActions } from '$/stores/actions';
15 import Topic from '$/components/topic/topic.svelte';
16 import ErrorBlock from '$/components/error_block/error_block.svelte';
17 import Loader from '$/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')} />