Files
flotilla/src/app/components/PrimaryNavItemSpace.svelte
T
2026-05-04 16:11:30 -07:00

29 lines
731 B
Svelte

<script lang="ts">
import {deriveRelayDisplay} from "@welshman/app"
import PrimaryNavItem from "@lib/components/PrimaryNavItem.svelte"
import RelayIcon from "@app/components/RelayIcon.svelte"
import {makeSpacePath, goToSpace} from "@app/util/routes"
import {notifications} from "@app/util/notifications"
type Props = {
url: string
}
const {url}: Props = $props()
const onClick = () => goToSpace(url)
const path = makeSpacePath(url)
const display = $derived(deriveRelayDisplay(url))
</script>
<PrimaryNavItem
href={path}
onclick={onClick}
title={$display}
class="tooltip-right"
notification={$notifications.has(path)}>
<RelayIcon {url} size={10} class="rounded-full" />
</PrimaryNavItem>