{paginatedGroupedNotifications.length === 0 && (
You don't have any notifications. Try changing your settings to see
more.
)}
{paginatedGroupedNotifications.map((notification) =>
notification.type === 'income' ? (
) : notification.notifications.length === 1 ? (
) : (
)
)}
{paginatedGroupedNotifications.length > 0 &&
allGroupedNotifications.length > NOTIFICATIONS_PER_PAGE && (
)}
)
}
function IncomeNotificationGroupItem(props: {
notificationGroup: NotificationGroup
className?: string
}) {
const { notificationGroup, className } = props
const { notifications } = notificationGroup
const numSummaryLines = 3
const [expanded, setExpanded] = useState(false)
const [highlighted, setHighlighted] = useState(
notifications.some((n) => !n.isSeen)
)
const onClickHandler = (event: React.MouseEvent