From e3f9bc744f954abcbb13a0403eebe99d8bd3151f Mon Sep 17 00:00:00 2001 From: A-Kashif108 Date: Wed, 4 Oct 2023 11:28:33 +0530 Subject: [PATCH 1/2] fix:popup --- src/components/Error/ModalSolutions.jsx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/components/Error/ModalSolutions.jsx b/src/components/Error/ModalSolutions.jsx index a70c838..e7820f6 100644 --- a/src/components/Error/ModalSolutions.jsx +++ b/src/components/Error/ModalSolutions.jsx @@ -11,8 +11,14 @@ Modal.setAppElement("#root"); const ModalSolutions = ({ isOpen, setOpenModal, error }) => { const colorBorderBox = useColorBorderBox(error); - if (isOpen) { return ( +
{ + setOpenModal((prev) => !prev); + } + } + > {
+ ); - } - - return null; }; export default ModalSolutions; From 792c4c5c13fe0480d7012630ee5b643d044cdc81 Mon Sep 17 00:00:00 2001 From: A-Kashif108 Date: Wed, 4 Oct 2023 21:06:53 +0530 Subject: [PATCH 2/2] fix:popup close --- src/components/Error/ModalSolutions.jsx | 13 ++++--------- yarn.lock | 6 +++--- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/src/components/Error/ModalSolutions.jsx b/src/components/Error/ModalSolutions.jsx index e7820f6..48eb7d2 100644 --- a/src/components/Error/ModalSolutions.jsx +++ b/src/components/Error/ModalSolutions.jsx @@ -12,16 +12,12 @@ const ModalSolutions = ({ isOpen, setOpenModal, error }) => { const colorBorderBox = useColorBorderBox(error); return ( -
{ - setOpenModal((prev) => !prev); - } - } - > setOpenModal((prev) => !prev) + } contentLabel="Modal solution" className={colorBorderBox + " modal"} id="main-div" @@ -69,7 +65,6 @@ const ModalSolutions = ({ isOpen, setOpenModal, error }) => {
- ); }; diff --git a/yarn.lock b/yarn.lock index ab60817..c6b1540 100644 --- a/yarn.lock +++ b/yarn.lock @@ -228,10 +228,10 @@ resolved "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.7.4.tgz" integrity sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw== -"@esbuild/win32-x64@0.16.15": +"@esbuild/linux-x64@0.16.15": version "0.16.15" - resolved "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.16.15.tgz" - integrity sha512-27h5GCcbfomVAqAnMJWvR1LqEY0dFqIq4vTe5nY3becnZNu0SX8F0+gTk3JPvgWQHzaGc6VkPzlOiMkdSUunUA== + resolved "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.16.15.tgz" + integrity sha512-t7/fOXBUKfigvhJLGKZ9TPHHgqNgpIpYaAbcXQk1X+fPeUG7x0tpAbXJ2wST9F/gJ02+CLETPMnhG7Tra2wqsQ== "@jridgewell/gen-mapping@^0.1.0": version "0.1.1"