feat: make comment items and posts consistent

This commit is contained in:
Xyphyn committed 2023-09-17 14:57:52 -07:00
1 parent 30d5dc9bf2
commit ae09c5ab92
5 files changed
+39 -27

No files matched your search

+11 -7
View File
@@ -127,13 +127,17 @@
description="This user has no submissions that match this filter."
/>
{:else}
{#each data.items as item (item.counts.id)}
{#if isCommentView(item) && (data.type == 'all' || data.type == 'comments')}
<CommentItem comment={item} />
{:else if !isCommentView(item) && (data.type == 'all' || data.type == 'posts')}
<Post post={item} />
{/if}
{/each}
<div
class="!divide-y divide-slate-200 dark:divide-zinc-800 flex flex-col"
>
{#each data.items as item (item.counts.id)}
{#if isCommentView(item) && (data.type == 'all' || data.type == 'comments')}
<CommentItem comment={item} />
{:else if !isCommentView(item) && (data.type == 'all' || data.type == 'posts')}
<Post post={item} />
{/if}
{/each}
</div>
{/if}
<Pageination
page={data.page}