diff --git a/commafeed-client/src/components/sidebar/UnreadCount.tsx b/commafeed-client/src/components/sidebar/UnreadCount.tsx index 83e0f047..bcc94c55 100644 --- a/commafeed-client/src/components/sidebar/UnreadCount.tsx +++ b/commafeed-client/src/components/sidebar/UnreadCount.tsx @@ -1,60 +1,28 @@ -import { Badge, Box, Flex, Tooltip } from "@mantine/core"; -import { Constants } from "app/constants"; -import { tss } from "tss"; +import { Badge, Indicator, Tooltip } from "@mantine/core" +import { Constants } from "app/constants" +import { tss } from "tss" const useStyles = tss.create(() => ({ - badge: { - width: "3.2rem", - cursor: "pointer", - display: "flex", - justifyContent: "flex-start", - alignItems: "center", - }, -})); + badge: { + width: "3.2rem", + cursor: "pointer", + }, +})) -export function UnreadCount(props: { - unreadCount: number; - newMessages?: boolean; -}) { - const { classes } = useStyles(); +export function UnreadCount(props: { unreadCount: number, newMessages: boolean | undefined }) { + const { classes } = useStyles() - if (props.unreadCount <= 0) return null; + if (props.unreadCount <= 0) return null - const count = props.unreadCount >= 10000 ? "10k+" : props.unreadCount; + const count = props.unreadCount >= 10000 ? "10k+" : props.unreadCount - return ( - - - - {/* Dot wrapper: always renders, but conditionally visible */} - - {props.newMessages && ( -
- )} - - - {count} - - - - ); + return ( + + + + {count} + + + + ) }