blob: bf2a190a554695d289b6d3ebdac5856cf998dde1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
<script>
export let id;
import { _ } from 'svelte-i18n';
import { getPost } from '$/stores/post';
import PostContent from '$/components/post_content/post_content.svelte';
import ErrorBlock from '$/components/error_block/error_block.svelte';
import Loader from '$/components/loader/loader.svelte';
$: store = getPost(id);
$: post = $store.data;
</script>
{#if $store.loading}
<Loader />
{/if}
{#if $store.error}
<ErrorBlock message={$_('post.error.unavailable')} />
{/if}
{#if post}
<PostContent post={post} />
{/if}
|