Skip to content

Commit

Permalink
change dispatch function to take chIdx value
Browse files Browse the repository at this point in the history
  • Loading branch information
sujitv19196 committed Oct 2, 2023
1 parent 627d051 commit 162a158
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/screens/EPub/views/EditINote/INoteEditor/INoteChapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ function INoteChapter ({

const handleClose = () => {
setInsertType(null);
setOpenModalIndex(openModalIndex);
}

const onInsert = (index) => (val) => {
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 162a158

Please sign in to comment.