Add notification badges

This commit is contained in:
Jon Staab
2024-11-14 10:53:13 -08:00
parent b296067e55
commit 14ad4ec785
21 changed files with 256 additions and 126 deletions
@@ -0,0 +1,17 @@
<script lang="ts">
import Icon from "@lib/components/Icon.svelte"
import SecondaryNavItem from "@lib/components/SecondaryNavItem.svelte"
import {makeSpacePath} from "@app/routes"
import {deriveNotification, getRoomFilters} from "@app/notifications"
export let url
export let room
const path = makeSpacePath(url, room)
const notification = deriveNotification(path, getRoomFilters(room), url)
</script>
<SecondaryNavItem href={path} notification={$notification}>
<Icon icon="hashtag" />
{room}
</SecondaryNavItem>