import React, { useState } from 'react'; import toast from 'react-hot-toast'; import { Button, Typography } from '@material-tailwind/react'; import ConfirmDialog from '../../../shared/ConfirmDialog'; const WebhookCard = (props: { webhooksArray: string[]; webhookUrl: string; handleDelete: () => void; }) => { const [deleteDialogOpen, setDeleteDialogOpen] = useState(false); return (
{props.webhookUrl}
setDeleteDialogOpen((preVal) => !preVal)} open={deleteDialogOpen} confirmButtonTitle="Yes, Confirm delete" handleConfirm={() => { setDeleteDialogOpen((preVal) => !preVal); props.handleDelete(); }} color="red" > Are you sure you want to delete the variable{' '} {props.webhookUrl} ?
); }; export default WebhookCard;