From 77c88b2075eb28b10f247a993f4bf1be3ad18f23 Mon Sep 17 00:00:00 2001 From: Vencislav Atanasov Date: Wed, 18 Sep 2024 21:57:36 +0300 Subject: [PATCH] Render all requests data --- src/Schedule.jsx | 44 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/src/Schedule.jsx b/src/Schedule.jsx index b278beb..c397577 100644 --- a/src/Schedule.jsx +++ b/src/Schedule.jsx @@ -1,10 +1,52 @@ import PropTypes from 'prop-types'; +import useEvents from './hooks/useEvents.js'; +import useSpeakers from './hooks/useSpeakers.js'; +import useTracks from './hooks/useTracks.js'; +import useEventTypes from './hooks/useEventTypes.js'; +import useHalls from './hooks/useHalls.js'; +import useSlots from './hooks/useSlots.js'; export default function Schedule({ conferenceId, }) { + const { + data: events, + } = useEvents(conferenceId); + + const { + data: speakers, + } = useSpeakers(conferenceId); + + const { + data: tracks, + } = useTracks(conferenceId); + + const { + data: eventTypes, + } = useEventTypes(conferenceId); + + const { + data: halls, + } = useHalls(conferenceId); + + const { + data: slots, + } = useSlots(conferenceId); + return (<> - conference id: {conferenceId} +
conference id: {conferenceId}
+
events:
+
{JSON.stringify(events)}
+
speakers:
+
{JSON.stringify(speakers)}
+
tracks:
+
{JSON.stringify(tracks)}
+
event types:
+
{JSON.stringify(eventTypes)}
+
halls:
+
{JSON.stringify(halls)}
+
slots:
+
{JSON.stringify(slots)}
); }