From 162a158b46b01e81b66e9f916c470fcb7bdf3c35 Mon Sep 17 00:00:00 2001 From: sujitv19196 Date: Sun, 1 Oct 2023 21:50:56 -0500 Subject: [PATCH] change dispatch function to take chIdx value --- src/screens/EPub/views/EditINote/INoteEditor/INoteChapter.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/screens/EPub/views/EditINote/INoteEditor/INoteChapter.js b/src/screens/EPub/views/EditINote/INoteEditor/INoteChapter.js index 6d1cb701a..4eb8cbbfd 100644 --- a/src/screens/EPub/views/EditINote/INoteEditor/INoteChapter.js +++ b/src/screens/EPub/views/EditINote/INoteEditor/INoteChapter.js @@ -28,7 +28,6 @@ function INoteChapter ({ const handleClose = () => { setInsertType(null); - setOpenModalIndex(openModalIndex); } const onInsert = (index) => (val) => { @@ -173,7 +172,7 @@ function INoteChapter ({ const handleYes = () => { dispatch({ type: 'epub/updateEpubData', payload: { - action: 'removeChapterContent', payload: { contentIdx: openModalIndex, type: 'image' } + action: 'removeChapterContentAtChapterIdx', payload: { chapterIdx: chIdx, contentIdx: openModalIndex, type: 'image' } } }); setDialogOpen(false);