This commit is contained in:
John Wu
2022-09-27 10:29:09 -07:00
committed by GitHub
parent 39ccee54be
commit b622e42286
8 changed files with 140 additions and 33 deletions

View File

@@ -68,7 +68,7 @@ const MainForm = () => {
const [orderBy, setOrderBy] = useState("id");
const [order, setOrder] = useState("asc");
const [search, setSearch] = useState("");
const [showDeleteModal, setShowDeleteModal] = useState(false)
const [showDeleteModal, setShowDeleteModal] = useState(false);
const { getManifests, deleteManifest, manifests, totalManifests } =
useManifestsContext();
const { setMessage, setTitle, setSitePath } = useStatusContext();
@@ -181,12 +181,17 @@ const MainForm = () => {
} else {
return (
<div>
<Tooltip key={`delete-${action.id}`} title={action.tip}>
<Link to="#" onClick={() => onDelete(action.id)}>
{action.icon}
</Link>
</Tooltip>
<DeleteConfirmation message={action.id} open={showDeleteModal} close={() => setShowDeleteModal(false)} deleteFunction={() => onDelete(action.id)} />
<Tooltip key={`delete-${action.id}`} title={action.tip}>
<Link to="#" onClick={() => onDelete(action.id)}>
{action.icon}
</Link>
</Tooltip>
<DeleteConfirmation
message={action.id}
open={showDeleteModal}
close={() => setShowDeleteModal(false)}
deleteFunction={() => onDelete(action.id)}
/>
</div>
);
}