Refactor community question comments display

- Adjusted spacing for the comments section for better visual alignment.
- Wrapped comments rendering in a conditional to ensure proper display only when comments exist.
- Maintained functionality for upvoting and deleting comments while improving code readability.
This commit is contained in:
Rotimi Best
2026-03-28 11:46:47 +01:00
parent 2dabfb179d
commit b1d138ce60
@@ -223,10 +223,11 @@
{/if}
</div>
<div class="my-8">
<div class="my-2">
{pluralize($t('community.answers'), communityApi.question?.comments.length ?? 0, true)}
</div>
{#if !!communityApi.question?.comments?.length}
<div class="space-y-2">
{#each communityApi.question?.comments as commentItem (commentItem.id)}
<CommunityCommentItem
@@ -252,6 +253,7 @@
/>
{/each}
</div>
{/if}
<hr />