/* Copyright (C) 2024 Manuel Bustillo*/ 'use client'; import { AbstractApi } from '@/app/api/abstract-api'; import { Guest , GuestSerializer} from '@/app/lib/guest'; import { PencilIcon, TrashIcon } from '@heroicons/react/24/outline'; import clsx from 'clsx'; import TableOfContents from '../components/table-of-contents'; export default function guestsTable({ guests, onUpdate, onEdit }: { guests: Guest[], onUpdate: () => void, onEdit: (guest: Guest) => void }) { const api = new AbstractApi(); const serializer = new GuestSerializer(); return ( ( {guest.name} {guest.group_name} {guest.status}
{ api.destroy(serializer, guest, onUpdate)}} /> onEdit(guest)} />
)} /> ); }