Comments

{#if user}
{ posting = true; return async ({ result, update }) => { posting = false; if (result.type === 'success') { content = ''; await update(); } }; }} class="mt-3" >
{:else}

Sign in to leave a comment.

{/if} {#if comments.length > 0}
{#each comments as comment}
{comment.author.name} {timeAgo(comment.createdAt)}

{comment.content}

{/each}
{:else if !user}

No comments yet.

{/if}