diff --git a/src/renderer/components/notifications/NotificationHeader.tsx b/src/renderer/components/notifications/NotificationHeader.tsx index 55c6178a1..f2941f70e 100644 --- a/src/renderer/components/notifications/NotificationHeader.tsx +++ b/src/renderer/components/notifications/NotificationHeader.tsx @@ -3,9 +3,10 @@ import type { FC, MouseEvent } from 'react'; import { Stack } from '@primer/react'; import { useAppContext } from '../../context/App'; -import { type GitifyNotification, GroupBy, Opacity, Size } from '../../types'; +import { type GitifyNotification, Opacity, Size } from '../../types'; import { cn } from '../../utils/cn'; import { openRepository } from '../../utils/links'; +import { isGroupByDate } from '../../utils/notifications/group'; import { AvatarWithFallback } from '../avatars/AvatarWithFallback'; interface NotificationHeaderProps { @@ -23,10 +24,8 @@ export const NotificationHeader: FC = ({ ? `#${notification.subject.number}` : ''; - const groupByDate = settings.groupBy === GroupBy.DATE; - return ( - groupByDate && ( + isGroupByDate(settings) && (