Comments

{#if canEdit}
{/if}
{#each localComments as comment}
{comment.user.name[0].toUpperCase()}
{comment.user.name} {formatDistanceToNow(new Date(comment.createdAt), { addSuffix: true })}
{#if editingId === comment.id}
{:else}
{#if ready} {@html renderMarkdown(comment.content)} {:else}

{comment.content}

{/if}
{#if comment.userId === currentUserId} {/if} {#if comment.userId === currentUserId || canEdit} {/if}
{/if}
{/each}
{#if localComments.length === 0}

No comments yet

{/if}