Manuel Bustillo
357fb617ce
All checks were successful
Add copyright notice / copyright_notice (pull_request) Successful in 1m43s
Check usage of free licenses / build-static-assets (pull_request) Successful in 1m47s
Build Nginx-based docker image / build-static-assets (pull_request) Successful in 8m24s
Playwright Tests / test (pull_request) Successful in 2m55s
33 lines
988 B
TypeScript
33 lines
988 B
TypeScript
/* Copyright (C) 2024 Manuel Bustillo*/
|
|
|
|
import { Guest } from "@/app/lib/definitions";
|
|
|
|
|
|
function GuestRow({ guests }: { guests: Guest[] }) {
|
|
return (<div className="justify-around flex flex-row">
|
|
{
|
|
guests.map((guest) => {
|
|
|
|
return (
|
|
<div className="m-3 w-24 h-24 rounded-full bg-neutral-400 hover:bg-neutral-500 content-center text-center">
|
|
{guest.name}
|
|
</div>
|
|
)
|
|
})
|
|
}
|
|
|
|
</div>)
|
|
}
|
|
|
|
export function Table({ guests }: { guests: Guest[] }) {
|
|
const halfwayThrough = Math.floor(guests.length / 2)
|
|
const arrayFirstHalf = guests.slice(0, halfwayThrough);
|
|
const arraySecondHalf = guests.slice(halfwayThrough, guests.length);
|
|
|
|
return (
|
|
<div className="m-12 h-64 bg-neutral-300 flex flex-col justify-between">
|
|
<GuestRow guests={arrayFirstHalf} />
|
|
<GuestRow guests={arraySecondHalf} />
|
|
</div>
|
|
)
|
|
} |