/* Copyright (C) 2024 Manuel Bustillo*/ 'use client'; import { Group } from '@/app/lib/definitions'; import TableOfContents from '../components/table-of-contents'; import { PencilIcon, TrashIcon } from '@heroicons/react/24/outline'; import { destroyGroup } from '@/app/api/groups'; export default function GroupsTable({ groups, onUpdate, onEdit }: { groups: Group[], onUpdate: () => void, onEdit: (group: Group) => void, }) { return ( ( {group.name}
{group.attendance?.confirmed} {group.attendance?.tentative} {group.attendance?.invited} {group.attendance?.declined} {group.attendance?.considered} {group.attendance?.total}
{ destroyGroup(group, () => onUpdate()) }} /> onEdit(group)} />
)} /> ) }