:
This commit is contained in:
parent
e0df9ed858
commit
4b9364fdb3
2 changed files with 33 additions and 5 deletions
|
|
@ -33,10 +33,30 @@ export default function Dashboard({ allGames, allTeams }) {
|
|||
<h1 className="mb-4 max-w-2xl text-4xl font-extrabold leading-none tracking-tight md:text-5xl xl:text-6xl">
|
||||
IsaCon
|
||||
</h1>
|
||||
<h2>Games</h2>
|
||||
<h2 className="mb-2 font-bold">Games</h2>
|
||||
{allGames.data.map((game) => (
|
||||
<div key={game.id}>
|
||||
{findTeam(game.homeTeam).name} - {findTeam(game.awayTeam).name}
|
||||
<div className="mb-2 flex max-w-sm flex-wrap overflow-hidden rounded bg-white shadow-lg">
|
||||
<div className="grid w-1/2 content-center p-2">
|
||||
{findTeam(game.homeTeam).logo?._meta.url ? (
|
||||
<img src={findTeam(game.homeTeam).logo?._meta.url} alt="Sunset in the mountains" />
|
||||
) : (
|
||||
findTeam(game.homeTeam).name
|
||||
)}
|
||||
</div>
|
||||
<div className="grid w-1/2 content-center p-2">
|
||||
{findTeam(game.awayTeam).logo?._meta.url ? (
|
||||
<img src={findTeam(game.awayTeam).logo?._meta.url} alt="Sunset in the mountains" />
|
||||
) : (
|
||||
findTeam(game.awayTeam).name
|
||||
)}
|
||||
</div>
|
||||
<div className="flex w-full justify-around p-2">
|
||||
<span>{game.homeScore}</span>
|
||||
<span>-</span>
|
||||
<span>{game.awayScore}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -23,9 +23,17 @@ export default function Dashboard({ allPlayers }) {
|
|||
IsaCon
|
||||
</h1>
|
||||
<h2>Players</h2>
|
||||
{allPlayers.data.map((player) => (
|
||||
<div key={player.id}>{player.name}</div>
|
||||
))}
|
||||
<div className="flex flex-wrap items-center justify-center">
|
||||
{allPlayers.data.map((player) => (
|
||||
<div className="p-2" key={player.id}>
|
||||
{player.avatar?._meta.url ? (
|
||||
<img className="max-w-sm" src={player.avatar?._meta.url} alt="Sunset in the mountains" />
|
||||
) : (
|
||||
player.name
|
||||
)}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue