diff --git a/web/pages/notifications.tsx b/web/pages/notifications.tsx index 0fe3b179..ca5e1827 100644 --- a/web/pages/notifications.tsx +++ b/web/pages/notifications.tsx @@ -200,7 +200,9 @@ function IncomeNotificationGroupItem(props: { const { notificationGroup, className } = props const { notifications } = notificationGroup const numSummaryLines = 3 - const [expanded, setExpanded] = useState(false) + const [expanded, setExpanded] = useState( + notifications.length <= numSummaryLines + ) const [highlighted, setHighlighted] = useState( notifications.some((n) => !n.isSeen) ) @@ -524,7 +526,7 @@ function IncomeNotificationItem(props: { -
+ ) @@ -541,7 +543,9 @@ function NotificationGroupItem(props: { const isMobile = (width && width < 768) || false const numSummaryLines = 3 - const [expanded, setExpanded] = useState(false) + const [expanded, setExpanded] = useState( + notifications.length <= numSummaryLines + ) const [highlighted, setHighlighted] = useState( notifications.some((n) => !n.isSeen) )