From: ajbura Date: Tue, 8 Feb 2022 12:29:15 +0000 (+0530) Subject: Fix bug in this.isRawModalVisible X-Git-Tag: v1.8.0~95 X-Git-Url: https://git.wafflesoft.org/?a=commitdiff_plain;h=4803d48ec79c534256637cda8bde38d9c35adbef;p=rainny.git Fix bug in this.isRawModalVisible Signed-off-by: ajbura --- diff --git a/src/app/atoms/modal/RawModal.jsx b/src/app/atoms/modal/RawModal.jsx index 31693cd..306d7d1 100644 --- a/src/app/atoms/modal/RawModal.jsx +++ b/src/app/atoms/modal/RawModal.jsx @@ -1,4 +1,4 @@ -import React from 'react'; +import React, { useEffect } from 'react'; import PropTypes from 'prop-types'; import './RawModal.scss'; @@ -26,7 +26,9 @@ function RawModal({ modalClass += 'raw-modal__small '; } - navigation.setIsRawModalVisible(isOpen); + useEffect(() => { + navigation.setIsRawModalVisible(isOpen); + }, [isOpen]); const modalOverlayClass = (overlayClassName !== null) ? `${overlayClassName} ` : ''; return (