import { useRef } from "react"; import { useMutation, useQueryClient } from "@tanstack/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"; import { releaseKeys } from "@screens/releases/ReleaseTable"; function ReleaseSettings() { const [deleteModalIsOpen, toggleDeleteModal] = useToggle(false); const queryClient = useQueryClient(); const deleteMutation = useMutation({ mutationFn: APIClient.release.delete, onSuccess: () => { toast.custom((t) => ( )); // Invalidate filters just in case, most likely not necessary but can't hurt. queryClient.invalidateQueries({ queryKey: releaseKeys.lists() }); } }); 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;