Hide table header when no items are available
This commit is contained in:
parent
c3d38a0fae
commit
a3a2ed8c3f
|
@ -48,11 +48,11 @@ export default function Schedule({
|
|||
{isComplete && <div className="schedule">
|
||||
<hr/>
|
||||
<table>
|
||||
<thead>
|
||||
{header.length > 0 && <thead>
|
||||
<tr>
|
||||
{header.map(hall => <th key={hall.id}>{hall.name[lang]}</th>)}
|
||||
</tr>
|
||||
</thead>
|
||||
</thead>}
|
||||
<tbody>
|
||||
{rows.map(row => <tr key={row.id}>
|
||||
{row.cells.map(cell => <td key={cell.id} {...cell.attributes}>
|
||||
|
@ -60,11 +60,11 @@ export default function Schedule({
|
|||
</td>)}
|
||||
</tr>)}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
{header.length > 0 && <tfoot>
|
||||
<tr>
|
||||
{header.map(hall => <th key={hall.id}>{hall.name[lang]}</th>)}
|
||||
</tr>
|
||||
</tfoot>
|
||||
</tfoot>}
|
||||
</table>
|
||||
<div className="separator"/>
|
||||
<table>
|
||||
|
|
Loading…
Reference in New Issue