{note?.title ?? "Loading..."} — Notebook
{#if loading}

Loading

{:else if note}

{#if unit}{unit.code}{unit.code2 ? ` / ${unit.code2}` : ""}{/if}{#if unit && topic} · {/if}{#if topic}{topic.name}{/if}

{note.title}

{note.authorName} · {timeAgo(note.createdAt)} {#if isAuthor} · {/if}

{note.content}

Comments ({comments.length})

{#if get(isAuthenticated)}
{commentError}
{:else}

Sign in to leave a comment.

{/if}
{#each comments as comment}

{comment.authorName} · {timeAgo(comment.createdAt)}

{comment.content}

{#if get(currentUser)?._id === comment.authorId} {/if}
{:else}

No comments yet.

{/each}
{:else}

Note not found

This note may have been deleted or doesn't exist.

Back to notes {/if}