diff --git a/web/pages/notifications.tsx b/web/pages/notifications.tsx index 250fae37..f86c4fef 100644 --- a/web/pages/notifications.tsx +++ b/web/pages/notifications.tsx @@ -157,6 +157,11 @@ function IncomeNotificationGroupItem(props: { notifications.some((n) => !n.isSeen) ) + const onClickHandler = (event: React.MouseEvent) => { + if (event.ctrlKey || event.metaKey) return + setExpanded(!expanded) + } + useEffect(() => { setNotificationsAsSeen(notifications) }, [notifications]) @@ -231,7 +236,7 @@ function IncomeNotificationGroupItem(props: { !expanded ? 'hover:bg-gray-100' : '', highlighted && !expanded ? 'bg-indigo-200 hover:bg-indigo-100' : '' )} - onClick={() => setExpanded(!expanded)} + onClick={onClickHandler} > {expanded && (
setExpanded(!expanded)} + onClick={onClickHandler} >
@@ -416,6 +421,12 @@ function NotificationGroupItem(props: { const [highlighted, setHighlighted] = useState( notifications.some((n) => !n.isSeen) ) + + const onClickHandler = (event: React.MouseEvent) => { + if (event.ctrlKey || event.metaKey) return + setExpanded(!expanded) + } + useEffect(() => { setNotificationsAsSeen(notifications) }, [notifications]) @@ -432,7 +443,7 @@ function NotificationGroupItem(props: { !expanded ? 'hover:bg-gray-100' : '', highlighted && !expanded ? 'bg-indigo-200 hover:bg-indigo-100' : '' )} - onClick={() => setExpanded(!expanded)} + onClick={onClickHandler} > {expanded && (