Skip to content

Commit

Permalink
fix: sort notifications (#1270)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielsimao authored Jun 6, 2023
1 parent 7283d1e commit f9afbb7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/NotificationsPopover/NotificationsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const NotificationsList = ({ items }: NotificationsListProps): JSX.Element => {
);
}

const latestTransactions = items.slice(-5);
const latestTransactions = items.slice(-5).sort((a, b) => b.date.getTime() - a.date.getTime());

return (
<Flex direction='column'>
Expand Down

2 comments on commit f9afbb7

@vercel
Copy link

@vercel vercel bot commented on f9afbb7 Jun 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on f9afbb7 Jun 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.