Skip to content
This repository was archived by the owner on Jan 8, 2025. It is now read-only.

Commit

Permalink
chore: remove unnecessary time addition (#442)
Browse files Browse the repository at this point in the history
  • Loading branch information
TuukkaIkius authored Mar 14, 2024
1 parent eec3890 commit b7c483b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/EventBanner/EventBanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ export interface Event {
export const getComingEvent = (event?: EventProps) => {
if (!event || !event?.title)
return { ...event?.defaultContent, sideButtons: { ...event?.sideButtons } };
const currentDate = new Date().setHours(0, 0, 0, 0);
const endDate = event.end ? new Date(event.end).setHours(0, 0, 0, 0) : null;
const currentDate = new Date();
const endDate = event.end ? new Date(event.end) : null;

if (endDate && currentDate > endDate) {
//Event end date has gone
Expand Down

0 comments on commit b7c483b

Please sign in to comment.