flotilla/src/app/components/ChannelName.svelte

12 lines
237 B
Svelte
Raw Normal View History

2024-12-10 01:04:39 +00:00
<script lang="ts">
import {GENERAL, channelsById, makeChannelId} from "@app/state"
const {url, room} = $props()
2024-12-10 01:04:39 +00:00
</script>
{#if room === GENERAL}
general
{:else}
{$channelsById.get(makeChannelId(url, room))?.name || room}
{/if}