First public commit

This commit is contained in:
Luke Vella 2022-04-12 07:14:28 +01:00
commit e05cd62e53
228 changed files with 17717 additions and 0 deletions

View file

@ -0,0 +1,25 @@
import { useModal } from "../modal";
import { useDeleteParticipantMutation } from "./mutations";
export const useDeleteParticipantModal = (
pollId: string,
participantId: string,
) => {
const { mutate: deleteParticipant } = useDeleteParticipantMutation(pollId);
return useModal({
title: "Delete participant?",
description:
"Are you sure you want to remove this participant from the poll?",
okButtonProps: {
type: "danger",
},
okText: "Remove",
onOk: () => {
deleteParticipant({
pollId: pollId,
participantId,
});
},
cancelText: "Cancel",
});
};