import { useHotlistData } from "../../hooks/useHotListData"; import { useIntegrationsContext } from "../../context/IntegrationsContext"; import Card from "../UI/Card"; import CardHeader from "../UI/CardHeader"; import { toast } from "sonner"; import { faTrash } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; const HotlistList = () => { const { state, dispatch } = useIntegrationsContext(); const { mutation } = useHotlistData(); const hotlists = state?.hotlistFiles; const handleDeleteClick = async (filename: string) => { await mutation.mutateAsync(filename); dispatch({ type: "DELETEHOTLIST", payload: filename }); toast.success(`${filename} successfully deleted`); }; return ( {hotlists.length > 0 ? ( ) : (
No Uploaded Hotlists

Hotlists will appear here once there are uploaded.

)}
); }; export default HotlistList;