Skip to content
This repository has been archived by the owner on Aug 7, 2024. It is now read-only.

Commit

Permalink
fix: future events filter (#5086)
Browse files Browse the repository at this point in the history
  • Loading branch information
eddiejaoude authored Feb 26, 2023
1 parent 75e3ed3 commit a65fa75
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions components/user/UserEvents.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ import EventKey from "../event/EventKey";

export default function UserEvents({ data }) {
const [eventType, seteventType] = useState("future");
const futureEvents = data.events.filter(
(event) => new Date(event.date.start) > new Date()
);

let categorisedEvents = {
future: data.events.filter(
(event) => new Date(event.date.start) > new Date()
),
future: futureEvents,
ongoing: data.events.filter(
(event) =>
new Date(event.date.start) < new Date() &&
Expand Down

0 comments on commit a65fa75

Please sign in to comment.