@@ -10,14 +10,14 @@ export function EventGridContainer() {
|
||||
const allEvents: EventInfo[] = isLoading
|
||||
? []
|
||||
: data.pages.flatMap(page => page.data!).map(it => ({
|
||||
type: it.type! as EventInfo['type'],
|
||||
coverImage: it.thumbnail! || PlaceholderImage,
|
||||
eventName: it.name!,
|
||||
description: it.description!,
|
||||
startTime: new Date(it.start_time!),
|
||||
endTime: new Date(it.end_time!),
|
||||
onJoinEvent: () => mutate({ body: { event_id: it.event_id } }),
|
||||
} satisfies EventInfo));
|
||||
type: it.type! as EventInfo['type'],
|
||||
coverImage: it.thumbnail! || PlaceholderImage,
|
||||
eventName: it.name!,
|
||||
description: it.description!,
|
||||
startTime: new Date(it.start_time!),
|
||||
endTime: new Date(it.end_time!),
|
||||
onJoinEvent: () => mutate({ body: { event_id: it.event_id } }),
|
||||
} satisfies EventInfo));
|
||||
|
||||
return <EventGridView events={allEvents} />;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user