1 <script lang="ts" context="module">
2 export const load = ({ params: { id } }) => ({ props: { id } });
6 import { _ } from 'svelte-i18n';
7 import { post } from '$lib/stores/posts';
8 import Post from '$lib/components/post/post.svelte';
9 import ErrorBlock from '$lib/components/error_block/error_block.svelte';
10 import Loader from '$lib/components/loader/loader.svelte';
12 export let id: string;
14 $: postResponse = post(id, true);
18 <title>{$_('post.post')}}</title>
21 {#if $postResponse.loading}
24 {#if $postResponse.error}
25 <ErrorBlock message={$_('post.error.unavailable')} />
27 {#if $postResponse.data}
28 <Post post={$postResponse.data} />