Export halls instead of header
This commit is contained in:
parent
67024419e0
commit
1779210759
|
@ -19,7 +19,7 @@ export default function Schedule({
|
||||||
speakers: allSpeakers,
|
speakers: allSpeakers,
|
||||||
tracks: allTracks,
|
tracks: allTracks,
|
||||||
eventTypes,
|
eventTypes,
|
||||||
halls,
|
halls: allHalls,
|
||||||
events: allEvents,
|
events: allEvents,
|
||||||
slots,
|
slots,
|
||||||
isLoading,
|
isLoading,
|
||||||
|
@ -30,16 +30,16 @@ export default function Schedule({
|
||||||
const [eventTypeId, setEventTypeId] = useState(0);
|
const [eventTypeId, setEventTypeId] = useState(0);
|
||||||
|
|
||||||
const {
|
const {
|
||||||
header,
|
|
||||||
rows,
|
rows,
|
||||||
speakers,
|
speakers,
|
||||||
tracks,
|
tracks,
|
||||||
|
halls,
|
||||||
events,
|
events,
|
||||||
} = useScheduleTable({
|
} = useScheduleTable({
|
||||||
eventTypeId,
|
eventTypeId,
|
||||||
speakers: allSpeakers,
|
speakers: allSpeakers,
|
||||||
tracks: allTracks,
|
tracks: allTracks,
|
||||||
halls,
|
halls: allHalls,
|
||||||
events: allEvents,
|
events: allEvents,
|
||||||
slots,
|
slots,
|
||||||
});
|
});
|
||||||
|
@ -55,10 +55,10 @@ export default function Schedule({
|
||||||
<hr/>
|
<hr/>
|
||||||
{rows.length > 0 && <>
|
{rows.length > 0 && <>
|
||||||
<table>
|
<table>
|
||||||
{header.length > 0 && <thead>
|
{halls.length > 0 && <thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th />
|
<th />
|
||||||
{header.map(hall => <th key={hall.id}>{hall.name[lang]}</th>)}
|
{halls.map(hall => <th key={hall.id}>{hall.name[lang]}</th>)}
|
||||||
</tr>
|
</tr>
|
||||||
</thead>}
|
</thead>}
|
||||||
<tbody>
|
<tbody>
|
||||||
|
@ -70,9 +70,9 @@ export default function Schedule({
|
||||||
</td>)}
|
</td>)}
|
||||||
</tr>)}
|
</tr>)}
|
||||||
</tbody>
|
</tbody>
|
||||||
{header.length > 0 && <tfoot>
|
{halls.length > 0 && <tfoot>
|
||||||
<tr>
|
<tr>
|
||||||
{header.map(hall => <th key={hall.id}>{hall.name[lang]}</th>)}
|
{halls.map(hall => <th key={hall.id}>{hall.name[lang]}</th>)}
|
||||||
</tr>
|
</tr>
|
||||||
</tfoot>}
|
</tfoot>}
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -140,9 +140,9 @@ export default function useScheduleTable({
|
||||||
});
|
});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
header: halls,
|
|
||||||
rows,
|
rows,
|
||||||
tracks,
|
tracks,
|
||||||
|
halls,
|
||||||
events,
|
events,
|
||||||
speakers,
|
speakers,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue