render players conditionally

This commit is contained in:
Joonas 2023-01-18 22:00:16 +02:00
parent 4fc8a4036d
commit bb2ab1014e
1 changed files with 22 additions and 18 deletions

View File

@ -181,6 +181,7 @@ export default function Index() {
<h1 className="text-center text-4xl tracking-tighter text-ctp-subtext0"> <h1 className="text-center text-4xl tracking-tighter text-ctp-subtext0">
{county.name} {county.name}
</h1> </h1>
{county?.players.length > 0 ? (
<table className="text-left"> <table className="text-left">
<thead> <thead>
<tr className="border-b border-ctp-surface2 text-ctp-subtext1"> <tr className="border-b border-ctp-surface2 text-ctp-subtext1">
@ -200,6 +201,9 @@ export default function Index() {
))} ))}
</tbody> </tbody>
</table> </table>
) : (
<p className="text-center">no players here yet :(</p>
)}
</li> </li>
))} ))}
</ul> </ul>