<script>
    import { channelsList } from '$lib/store';
    import Channel from './Channel.svelte';

    export let active = null;

    $: channels = $channelsList.channels;
</script>

<nav class="list-nav">
    <ul>
        {#each channels as channel}
            <Channel {...channel} active={active === channel.id} />
        {/each}
    </ul>
</nav>
