X-Git-Url: https://git.r.bdr.sh/rbdr/forum/blobdiff_plain/be1ce532b26aea4e3e2258da78849bd245f7f78b..refs/heads/main:/src/lib/components/topic/topic.svelte diff --git a/src/lib/components/topic/topic.svelte b/src/lib/components/topic/topic.svelte index ec89876..7fb4101 100644 --- a/src/lib/components/topic/topic.svelte +++ b/src/lib/components/topic/topic.svelte @@ -7,41 +7,50 @@ import Post from '$lib/components/post/post.svelte'; 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);
-

{topic.title}

+

{topic.title}

- {#if topic.tags.length > 0} + {#if topic.tags} {/if} - {#each topic.posts as post, index} - - {/each} + {#if topic.posts} + {#each topic.posts as post, index} + + {/each} + {/if}