/* Copyright (C) 2024 Manuel Bustillo*/ 'use client'; import { destroyGuest, updateGuest } from '@/app/api/guests'; import { Guest, GuestStatus } from '@/app/lib/definitions'; import { classNames } from '@/app/ui/components/button'; 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 }) { return ( ( {guest.name} {guest.group_name} {guest.status}
{ destroyGuest(guest, () => onUpdate()) }} /> onEdit(guest)} />
)} /> ); }