X-Git-Url: https://git.r.bdr.sh/rbdr/forum/blobdiff_plain/cac85db02ff00732cf75d473dc3411332f33d845..3d65cb04707cf3af11885995fd1110a5971d8b00:/src/lib/components/topic_summary/topic_summary.svelte

diff --git a/src/lib/components/topic_summary/topic_summary.svelte b/src/lib/components/topic_summary/topic_summary.svelte
index 39dad08..8c4df4d 100644
--- a/src/lib/components/topic_summary/topic_summary.svelte
+++ b/src/lib/components/topic_summary/topic_summary.svelte
@@ -1,16 +1,22 @@
 <script lang="ts">
-	export let topic;
+	import type { Topic } from '$lib/data/types';
+
+	export let topic: Topic;
 
 	import { _ } from 'svelte-i18n';
 	import { readableTime } from '$lib/utils/readable_time';
 
-	$: remainingTime = topic.updated_at + topic.ttl - Date.now();
+	$: remainingTime = new Date(topic.updated_at).getTime() + topic.ttl - Date.now();
 	$: remaining = readableTime(remainingTime);
 </script>
 
 <li class="h-entry" title={$_('topic.title')}>
 	<span class="p-name">
-		<a class="u-url u-uid" title={$_('topic.permalink_title')} href="/t/{topic.id}">
+		<a
+			class="u-url u-uid underline text-blue-600 visited:text-purple-500"
+			title={$_('topic.permalink_title')}
+			href="/t/{topic.id}"
+		>
 			{topic.title}
 		</a></span
 	>
@@ -20,6 +26,3 @@
 		})})
 	</span>
 </li>
-
-<style>
-</style>
