/* Copyright (C) 2024 Manuel Bustillo*/ 'use client'; import { AbstractApi } from '@/app/api/abstract-api'; import { TableArrangement } from '@/app/lib/definitions'; import { TableSimulation, TableSimulationSerializer } from '@/app/lib/tableSimulation'; import { getSlug } from '@/app/lib/utils'; import { Table } from '@/app/ui/components/table'; import { lusitana } from '@/app/ui/fonts'; import { useState, useEffect } from 'react'; export default function Arrangement({ id }: { id: string }) { const [simulation, setSimulation] = useState(undefined); function loadSimulation() { new AbstractApi().get(new TableSimulationSerializer(), id, (object: TableSimulation) => { setSimulation(object); }); } useEffect(loadSimulation, []); return (

Table distributions

{simulation && simulation.tables.map((table) => ( ))} ) }