Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
Co-authored-by: Khavin Shankar <[email protected]>
  • Loading branch information
Pranshu1902 and khavinshankar authored Oct 4, 2023
1 parent dc42a6d commit e9c0a6d
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions src/Components/Notifications/NotificationsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -352,25 +352,16 @@ export default function NotificationsList({
} else if (data?.length) {
manageResults = (
<>
{showUnread
? data
.filter((notification: any) => notification.read_at === null)
{data
.filter((notification: any) => showUnread ? notification.read_at === null : true)
.map((result: any) => (
<NotificationTile
key={result.id}
notification={result}
onClickCB={onClickCB}
setShowNotifications={setOpen}
/>
))
: data.map((result: any) => (
<NotificationTile
key={result.id}
notification={result}
onClickCB={onClickCB}
setShowNotifications={setOpen}
/>
))}
))}
{isLoading && (
<div className="flex items-center justify-center">
<CircularProgress />
Expand Down

0 comments on commit e9c0a6d

Please sign in to comment.