Remove top left cell from header array
This commit is contained in:
parent
570f136ef8
commit
67024419e0
|
@ -57,6 +57,7 @@ export default function Schedule({
|
|||
<table>
|
||||
{header.length > 0 && <thead>
|
||||
<tr>
|
||||
<th />
|
||||
{header.map(hall => <th key={hall.id}>{hall.name[lang]}</th>)}
|
||||
</tr>
|
||||
</thead>}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import { useMemo } from 'react';
|
||||
import { sorter } from '../utils.js';
|
||||
import { langs } from '../Schedule/constants.js';
|
||||
import { compareAsc, getTime, isSameDay, toDate } from 'date-fns';
|
||||
|
||||
export default function useScheduleTable({
|
||||
|
@ -27,13 +26,6 @@ export default function useScheduleTable({
|
|||
const halls = allHalls.filter(hall => hallIds.has(hall.id));
|
||||
const skipHallSlots = new Map();
|
||||
|
||||
const header = [{
|
||||
id: 0,
|
||||
name: Object.fromEntries(Object.keys(langs).map(lang => [lang, ''])),
|
||||
},
|
||||
...halls,
|
||||
];
|
||||
|
||||
const rows = microslots.flatMap((date, slotsIndex, slotsArray) => {
|
||||
const isFirst = slotsIndex === 0;
|
||||
const isLast = slotsIndex === slotsArray.length - 1;
|
||||
|
@ -126,7 +118,7 @@ export default function useScheduleTable({
|
|||
cells: [{
|
||||
id: 'header',
|
||||
attributes: {
|
||||
colSpan: header.length,
|
||||
colSpan: halls.length + 1,
|
||||
},
|
||||
dateHeader: date,
|
||||
}],
|
||||
|
@ -148,7 +140,7 @@ export default function useScheduleTable({
|
|||
});
|
||||
|
||||
return {
|
||||
header,
|
||||
header: halls,
|
||||
rows,
|
||||
tracks,
|
||||
events,
|
||||
|
|
Loading…
Reference in New Issue