Skip to content

Commit 2c0f041

Browse files
authored
refactor: invert groupBy to avoid negative conditions (#1290)
1 parent f5ba287 commit 2c0f041

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/components/NotificationRow.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ export const NotificationRow: FC<INotificationRow> = ({
109109
const repoAvatarUrl = notification.repository.owner.avatar_url;
110110
const repoSlug = notification.repository.full_name;
111111

112-
const groupByRepository = settings.groupBy === 'REPOSITORY';
112+
const groupByDate = settings.groupBy === 'DATE';
113113

114114
return (
115115
<div
@@ -126,7 +126,7 @@ export const NotificationRow: FC<INotificationRow> = ({
126126
title={notificationTitle}
127127
>
128128
<NotificationIcon
129-
size={groupByRepository ? 16 : 20}
129+
size={groupByDate ? 20 : 16}
130130
aria-label={notification.subject.type}
131131
/>
132132
</div>
@@ -135,7 +135,7 @@ export const NotificationRow: FC<INotificationRow> = ({
135135
className="flex-1 overflow-hidden overflow-ellipsis whitespace-nowrap"
136136
onClick={() => handleNotification()}
137137
>
138-
{!groupByRepository && (
138+
{groupByDate && (
139139
<div
140140
className="mb-1 flex items-center gap-1 cursor-pointer truncate text-sm font-medium "
141141
title={repoSlug}

0 commit comments

Comments
 (0)