Fix bug in this.isRawModalVisible

Signed-off-by: ajbura <ajbura@gmail.com>
This commit is contained in:
ajbura 2022-02-08 17:59:15 +05:30
parent 7c6a12ea8e
commit 4803d48ec7

View file

@ -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 (