Add a confirmation dialog
This commit is contained in:
parent
f256e0f9e7
commit
72691f7070
@ -54,9 +54,11 @@ function InvitationCard({ invitation, allGuests, onGuestAdded, onDestroy }: {
|
|||||||
<TrashIcon
|
<TrashIcon
|
||||||
className="w-5 h-5 text-white absolute top-2 right-2 opacity-0 group-hover:opacity-100 cursor-pointer"
|
className="w-5 h-5 text-white absolute top-2 right-2 opacity-0 group-hover:opacity-100 cursor-pointer"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
api.destroy(serializer, invitation, () => {
|
if (window.confirm("Are you sure you want to delete this invitation?")) {
|
||||||
onDestroy(invitation);
|
api.destroy(serializer, invitation, () => {
|
||||||
});
|
onDestroy(invitation);
|
||||||
|
});
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user