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">
|
{isComplete && <div className="schedule">
|
||||||
<hr/>
|
<hr/>
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
{header.length > 0 && <thead>
|
||||||
<tr>
|
<tr>
|
||||||
{header.map(hall => <th key={hall.id}>{hall.name[lang]}</th>)}
|
{header.map(hall => <th key={hall.id}>{hall.name[lang]}</th>)}
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>}
|
||||||
<tbody>
|
<tbody>
|
||||||
{rows.map(row => <tr key={row.id}>
|
{rows.map(row => <tr key={row.id}>
|
||||||
{row.cells.map(cell => <td key={cell.id} {...cell.attributes}>
|
{row.cells.map(cell => <td key={cell.id} {...cell.attributes}>
|
||||||
|
@ -60,11 +60,11 @@ export default function Schedule({
|
||||||
</td>)}
|
</td>)}
|
||||||
</tr>)}
|
</tr>)}
|
||||||
</tbody>
|
</tbody>
|
||||||
<tfoot>
|
{header.length > 0 && <tfoot>
|
||||||
<tr>
|
<tr>
|
||||||
{header.map(hall => <th key={hall.id}>{hall.name[lang]}</th>)}
|
{header.map(hall => <th key={hall.id}>{hall.name[lang]}</th>)}
|
||||||
</tr>
|
</tr>
|
||||||
</tfoot>
|
</tfoot>}
|
||||||
</table>
|
</table>
|
||||||
<div className="separator"/>
|
<div className="separator"/>
|
||||||
<table>
|
<table>
|
||||||
|
|
Loading…
Reference in New Issue