X-Git-Url: https://git.r.bdr.sh/rbdr/forum/blobdiff_plain/a7cf03c192470cbab13edeb1aec99e0c66dede10..1b6766772750f43f6963105307ca64ad240750a2:/src/lib/components/post/post.svelte?ds=inline

diff --git a/src/lib/components/post/post.svelte b/src/lib/components/post/post.svelte
index 4e6c28f..535f7ac 100644
--- a/src/lib/components/post/post.svelte
+++ b/src/lib/components/post/post.svelte
@@ -1,12 +1,14 @@
 <script lang="ts">
-	export let post;
+	import type { Post } from '$lib/data/types';
+
+	export let post: Post;
 	export let index = 0;
 	export let count = 1;
 
 	import { _ } from 'svelte-i18n';
 	import Glyph from '$lib/components/glyph/glyph.svelte';
 
-	const timestampToISO = (timestamp) => new Date(timestamp).toISOString();
+	const timestampToISO = (timestamp: number) => new Date(timestamp).toISOString();
 </script>
 
 <aside
@@ -23,11 +25,11 @@
 			{timestampToISO(post.created_at)}
 		</a>
 	</time>
-  {#if post.topic}
-  <span>
-    ({$_('post.topic_location')} <a href="/t/{post.topic.id}">{post.topic.title}</a>.)
-  </span>
-  {/if}
+	{#if post.topic}
+		<span>
+			({$_('post.topic_location')} <a href="/t/{post.topic.id}">{post.topic.title}</a>.)
+		</span>
+	{/if}
 </aside>
 <article
 	class="e-content"
