import { useRef } from "react"; import { useMutation, useQueryClient } from "react-query"; import { toast } from "react-hot-toast"; import { APIClient } from "../../api/APIClient"; import Toast from "../../components/notifications/Toast"; import { useToggle } from "../../hooks/hooks"; import { DeleteModal } from "../../components/modals"; function ReleaseSettings() { const [deleteModalIsOpen, toggleDeleteModal] = useToggle(false); const queryClient = useQueryClient(); const deleteMutation = useMutation(() => APIClient.release.delete(), { onSuccess: () => { toast.custom((t) => ( )); // Invalidate filters just in case, most likely not necessary but can't hurt. queryClient.invalidateQueries("releases"); } }); const deleteAction = () => { deleteMutation.mutate(); }; const cancelModalButtonRef = useRef(null); return (

Releases

Release settings. Reset state.

Danger Zone

This will clear all release history in your database.

); } export default ReleaseSettings;