/* Copyright (C) 2024 Manuel Bustillo*/
import { Guest } from "@/app/lib/guest";
function Dish({ guest, rotation }: { guest: Guest, rotation?: number }) {
rotation = rotation || 0
return (
{guest.name}
)
}
function GuestRow({ guests }: { guests: Guest[] }) {
return (
{guests.map((guest) => )}
)
}
function RectangularTable({ guests }: { guests: Guest[] }) {
const halfwayThrough = Math.floor(guests.length / 2)
const arrayFirstHalf = guests.slice(0, halfwayThrough);
const arraySecondHalf = guests.slice(halfwayThrough, guests.length);
return (
)
}
function RoundedTable({ guests }: { guests: Guest[] }) {
const size = 500
const rotation = 360 / guests.length
return (
{
guests.map((guest, index) => {
return (
)
})
}
)
}
export function Table({ guests, style }: { guests: Guest[], style: "rectangular" | "rounded" }) {
return (
<>
{style === "rectangular" && }
{style === "rounded" && }
>
)
}