From 17792107596ff7968a3b5e5c11ac1d8b45f2891a Mon Sep 17 00:00:00 2001 From: Vencislav Atanasov Date: Sat, 5 Oct 2024 00:24:25 +0300 Subject: [PATCH] Export halls instead of header --- src/Schedule/Schedule.jsx | 14 +++++++------- src/hooks/useScheduleTable.js | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Schedule/Schedule.jsx b/src/Schedule/Schedule.jsx index 95ad4b3..a283083 100644 --- a/src/Schedule/Schedule.jsx +++ b/src/Schedule/Schedule.jsx @@ -19,7 +19,7 @@ export default function Schedule({ speakers: allSpeakers, tracks: allTracks, eventTypes, - halls, + halls: allHalls, events: allEvents, slots, isLoading, @@ -30,16 +30,16 @@ export default function Schedule({ const [eventTypeId, setEventTypeId] = useState(0); const { - header, rows, speakers, tracks, + halls, events, } = useScheduleTable({ eventTypeId, speakers: allSpeakers, tracks: allTracks, - halls, + halls: allHalls, events: allEvents, slots, }); @@ -55,10 +55,10 @@ export default function Schedule({
{rows.length > 0 && <> - {header.length > 0 && + {halls.length > 0 && )} + {halls.map(hall => )} } @@ -70,9 +70,9 @@ export default function Schedule({ )} )} - {header.length > 0 && + {halls.length > 0 && - {header.map(hall => )} + {halls.map(hall => )} }
- {header.map(hall => {hall.name[lang]}{hall.name[lang]}
{hall.name[lang]}{hall.name[lang]}
diff --git a/src/hooks/useScheduleTable.js b/src/hooks/useScheduleTable.js index 03621af..cdee784 100644 --- a/src/hooks/useScheduleTable.js +++ b/src/hooks/useScheduleTable.js @@ -140,9 +140,9 @@ export default function useScheduleTable({ }); return { - header: halls, rows, tracks, + halls, events, speakers, };