sort by created at, newest on top

This commit is contained in:
@s.roertgen 2025-04-30 11:00:23 +02:00
parent c90b5ce0b1
commit d3fb4275ba

View file

@ -57,7 +57,7 @@
{/key} {/key}
<div class="mx-auto flex w-full flex-col items-center justify-center gap-5"> <div class="mx-auto flex w-full flex-col items-center justify-center gap-5">
{#each $comments as event} {#each $comments.sort((a, b) => a.created_at - b.created_at).reverse() as event}
<Comment {event} /> <Comment {event} />
{/each} {/each}
</div> </div>