import { Button, Form, FormButtons, SubmitButton } from 'react-basics'; import useApi from 'hooks/useApi'; import useMessages from 'hooks/useMessages'; export function TeamDeleteForm({ teamId, teamName, onSave, onClose }) { const { formatMessage, labels, messages, FormattedMessage } = useMessages(); const { del, useMutation } = useApi(); const { mutate, error, isLoading } = useMutation(data => del(`/teams/${teamId}`, data)); const handleSubmit = async data => { mutate(data, { onSuccess: async () => { onSave(); onClose(); }, }); }; return (
); } export default TeamDeleteForm;