Skip to content

Commit

Permalink
Adding time to event api to see errors
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianCheung1 committed Oct 18, 2023
1 parent 767e413 commit f74d9b9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions app/api/events/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ export async function GET(req: Request) {
return NextResponse.json(
{
msg: "Success",
time: currentDate,
active_events: activeEvents,
upcoming_events: upcomingEvents,
},
Expand Down
4 changes: 2 additions & 2 deletions components/EventList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
Image,
} from "@mantine/core"
import useEvents from "@/hooks/useEvents"
import {useEffect, useState} from "react"
import { useEffect, useState } from "react"

export const EventList = () => {
const { data, isLoading } = useEvents()
Expand Down Expand Up @@ -180,7 +180,7 @@ export const EventList = () => {

return (
<>
<Title>Active Events {currentTime.toString()}</Title>
<Title>Active Events </Title>
<Accordion> {renderActiveEvents}</Accordion>
<Title>Upcoming Events</Title>
<Accordion>{renderUpcomingEvents}</Accordion>
Expand Down

0 comments on commit f74d9b9

Please sign in to comment.