diff --git a/app/ui/guests/table.tsx b/app/ui/guests/table.tsx index 9205a65..66b2919 100644 --- a/app/ui/guests/table.tsx +++ b/app/ui/guests/table.tsx @@ -27,8 +27,8 @@ export default function guestsTable() { }; - function handleInviteGuest() { - fetch("http://localhost:3001/guests/bulk-status-change.json", { method: 'POST', body: JSON.stringify({ status: "Invited", guest_ids: [] }) }) + const handleInviteGuest = (e: React.MouseEvent) => { + fetch("http://localhost:3001/guests/bulk-status-change.json", { method: 'POST', body: JSON.stringify({ status: "Invited", guest_ids: [e.currentTarget.getAttribute('data-guest-id')] }) }) .then((response) => console.log(response.json())) .catch((error) => console.error(error)); } @@ -91,7 +91,7 @@ export default function guestsTable() { - {guest.status === 'Considered' && ()}