flotilla/src/app/components/MenuSpaceRoomItem.svelte

25 lines
653 B
Svelte
Raw Normal View History

2024-11-14 18:53:13 +00:00
<script lang="ts">
import SecondaryNavItem from "@lib/components/SecondaryNavItem.svelte"
2025-10-30 22:36:14 +00:00
import RoomNameWithImage from "@app/components/RoomNameWithImage.svelte"
import {makeRoomPath} from "@app/util/routes"
import {notifications} from "@app/util/notifications"
2024-11-14 18:53:13 +00:00
2025-02-04 00:37:14 +00:00
interface Props {
url: any
2025-10-30 22:33:34 +00:00
h: any
2025-02-04 00:37:14 +00:00
notify?: boolean
replaceState?: boolean
2025-02-04 00:37:14 +00:00
}
2025-10-30 22:33:34 +00:00
const {url, h, notify = false, replaceState = false}: Props = $props()
2024-11-14 18:53:13 +00:00
2025-10-30 22:33:34 +00:00
const path = makeRoomPath(url, h)
2024-11-14 18:53:13 +00:00
</script>
<SecondaryNavItem
href={path}
{replaceState}
notification={notify ? $notifications.has(path) : false}>
2025-10-30 22:36:14 +00:00
<RoomNameWithImage {url} {h} />
2024-11-14 18:53:13 +00:00
</SecondaryNavItem>