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:
@@ -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 />
|
||||
|
||||
|
||||
Reference in New Issue
Block a user