import { Badge, Indicator, Tooltip } from "@mantine/core" import { Constants } from "@/app/constants" import { tss } from "@/tss" const useStyles = tss.create(() => ({ badge: { width: "3.2rem", // for some reason, mantine Badge has "cursor: 'default'" cursor: "pointer", }, })) export function UnreadCount( props: Readonly<{ unreadCount: number showIndicator: boolean }> ) { const { classes } = useStyles() if (props.unreadCount <= 0) return null const count = props.unreadCount >= 10000 ? "10k+" : props.unreadCount return ( {count} ) }