import { Button, Form, FormRow, FormButtons, FormInput, SubmitButton, TextField, } from 'react-basics'; import useApi from 'hooks/useApi'; import useMessages from 'hooks/useMessages'; const CONFIRM_VALUE = 'DELETE'; export function WebsiteDeleteForm({ websiteId, onSave, onClose }) { const { formatMessage, labels, messages, FormattedMessage } = useMessages(); const { del, useMutation } = useApi(); const { mutate, error } = useMutation(data => del(`/websites/${websiteId}`, data)); const handleSubmit = async data => { mutate(data, { onSuccess: async () => { onSave(); onClose(); }, }); }; return (
); } export default WebsiteDeleteForm;