Fix squirrely notification badges

This commit is contained in:
Jon Staab
2024-12-11 14:10:20 -08:00
parent c83461688f
commit 167cd045f4
6 changed files with 26 additions and 28 deletions
@@ -3,18 +3,17 @@
import PrimaryNavItem from "@lib/components/PrimaryNavItem.svelte"
import SpaceAvatar from "@app/components/SpaceAvatar.svelte"
import {makeSpacePath} from "@app/routes"
import {deriveNotification, SPACE_FILTERS} from "@app/notifications"
import {spacesNotifications} from "@app/notifications"
export let url
const path = makeSpacePath(url)
const notification = deriveNotification(path, SPACE_FILTERS, url)
</script>
<PrimaryNavItem
title={displayRelayUrl(url)}
href={path}
class="tooltip-right"
notification={$notification}>
notification={$spacesNotifications.includes(path)}>
<SpaceAvatar {url} />
</PrimaryNavItem>