From 78daca73b9575335ce530247576ebd3b4dd03cfd Mon Sep 17 00:00:00 2001 From: Pierre Leroux Date: Wed, 25 Oct 2023 14:35:27 +0200 Subject: [PATCH] sync with develop --- .../library/components/dialog/DeletePublicationConfirm.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/renderer/library/components/dialog/DeletePublicationConfirm.tsx b/src/renderer/library/components/dialog/DeletePublicationConfirm.tsx index 81f0e0907..65d858e71 100644 --- a/src/renderer/library/components/dialog/DeletePublicationConfirm.tsx +++ b/src/renderer/library/components/dialog/DeletePublicationConfirm.tsx @@ -17,12 +17,12 @@ import { dialogActions } from "readium-desktop/common/redux/actions"; const DeletePublicationConfirm = (props: { publicationView: PublicationView, trigger: React.ReactNode } & AlertDialog.AlertDialogProps) => { const [__] = useTranslator(); - const [_, remove] = useApi(undefined, "publication/delete", props.publicationView.identifier); + const [_, remove] = useApi(undefined, "publication/delete"); const dispatch = useDispatch(); const removeAction = React.useCallback(() => { dispatch(dialogActions.closeRequest.build()); - remove(); - }, [remove]); + remove(props.publicationView.identifier); + }, [remove, props.publicationView.identifier]); const appOverlayElement = React.useMemo(() => document.getElementById("app-overlay"), []); return (