From 2638b0285a062fb33dbfc815d622de334a962e2b Mon Sep 17 00:00:00 2001 From: Aditya Pratap Singh Hada <49001649+apshada@users.noreply.github.com> Date: Sat, 29 Apr 2023 20:08:19 +0530 Subject: [PATCH] Fix: replaced this by page name (#6069) * Fix: replaced this by page name * Fix: replaced current page reference --- frontend/src/Editor/Editor.jsx | 6 ++++-- .../Editor/LeftSidebar/SidebarPageSelector/PageHandler.jsx | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/frontend/src/Editor/Editor.jsx b/frontend/src/Editor/Editor.jsx index 84c9636589..a3e78e018d 100644 --- a/frontend/src/Editor/Editor.jsx +++ b/frontend/src/Editor/Editor.jsx @@ -1403,12 +1403,13 @@ class EditorComponent extends React.Component { ); }; - deletePageRequest = (pageId, isHomePage = false) => { + deletePageRequest = (pageId, isHomePage = false, pageName = '') => { this.setState({ showPageDeletionConfirmation: { isOpen: true, pageId, isHomePage, + pageName, }, }); }; @@ -1419,6 +1420,7 @@ class EditorComponent extends React.Component { isOpen: false, pageId: null, isHomePage: false, + pageName: null, }, }); }; @@ -1837,7 +1839,7 @@ class EditorComponent extends React.Component { this.executeDeletepageRequest()} onCancel={() => this.cancelDeletePageRequest()} diff --git a/frontend/src/Editor/LeftSidebar/SidebarPageSelector/PageHandler.jsx b/frontend/src/Editor/LeftSidebar/SidebarPageSelector/PageHandler.jsx index 32a132abcf..e61f8d0215 100644 --- a/frontend/src/Editor/LeftSidebar/SidebarPageSelector/PageHandler.jsx +++ b/frontend/src/Editor/LeftSidebar/SidebarPageSelector/PageHandler.jsx @@ -54,7 +54,7 @@ export const PageHandler = ({ setIsHovered(false); switch (id) { case 'delete-page': - deletePage(page.id, isHomePage); + deletePage(page.id, isHomePage, page.name); break; case 'rename-page':