1 <script lang="ts" context="module">
4 }) => ({ props: { id } });
8 import { _ } from 'svelte-i18n';
9 import { post } from '$lib/stores/posts';
10 import Post from '$lib/components/post/post.svelte';
11 import ErrorBlock from '$lib/components/error_block/error_block.svelte';
12 import Loader from '$lib/components/loader/loader.svelte';
14 export let id: string;
16 $: postResponse = post(id, true);
20 <title>{$_('post.post')}}</title>
23 {#if $postResponse.loading}
26 {#if $postResponse.error}
27 <ErrorBlock message={$_('post.error.unavailable')} />
29 {#if $postResponse.data}
30 <Post post={$postResponse.data} />