{#if loading}

Loading threads...

{:else}
Filter by topic: {#each getTopicsWithCounts() as { topic, count }} {/each}
{#if selectedTopic === null}

General

{#each getThreadsByTopic(null) as thread} {/each} {#each getTopics() as topic}

{topic}

{#each getThreadsByTopic(topic) as thread} {/each} {/each} {:else}

{selectedTopic === undefined ? 'General' : selectedTopic}

{#each getFilteredThreads() as thread} {/each} {#if getFilteredThreads().length === 0}

No threads found in this topic.

{/if} {/if}
{/if}