Skip to content

Commit 63b4acb

Browse files
Tony QiuTony Qiu
authored andcommitted
new badge if added in last 17 hours
1 parent 2c6dac1 commit 63b4acb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

frontend/src/components/EventsGrid.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ const isEventNew = (event: Event): boolean => {
4242

4343
const now = new Date();
4444
const addedAt = new Date(event.added_at);
45-
const twentyFourHoursInMs = 24 * 60 * 60 * 1000;
45+
const seventeenHoursInMs = 17 * 60 * 60 * 1000;
4646

47-
return (now.getTime() - addedAt.getTime()) <= twentyFourHoursInMs;
47+
return (now.getTime() - addedAt.getTime()) <= seventeenHoursInMs;
4848
};
4949

5050
const EventStatusBadge = ({ event }: { event: Event }) => {

0 commit comments

Comments
 (0)