Skip to content

Commit

Permalink
fix:popup #175 (#176)
Browse files Browse the repository at this point in the history
* fix:popup

* fix:popup close
  • Loading branch information
A-Kashif108 committed Oct 5, 2023
1 parent 0d83ccb commit eed3059
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
9 changes: 4 additions & 5 deletions src/components/Error/ModalSolutions.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ Modal.setAppElement("#root");
const ModalSolutions = ({ isOpen, setOpenModal, error }) => {
const colorBorderBox = useColorBorderBox(error);

if (isOpen) {
return (
<Modal
isOpen={isOpen}
onRequestClose={setOpenModal}
shouldCloseOnOverlayClick={true}
onRequestClose={
() => setOpenModal((prev) => !prev)
}
contentLabel="Modal solution"
className={colorBorderBox + " modal"}
id="main-div"
Expand Down Expand Up @@ -64,9 +66,6 @@ const ModalSolutions = ({ isOpen, setOpenModal, error }) => {
</div>
</Modal>
);
}

return null;
};

export default ModalSolutions;
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

1 comment on commit eed3059

@vercel
Copy link

@vercel vercel bot commented on eed3059 Oct 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.