aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2020-06-29 22:36:57 +0300
committereug-vs <eug-vs@keemail.me>2020-06-29 22:36:57 +0300
commitb301bf24c5037403a1e5fc32fc8c10794941b528 (patch)
treef9ccf2d788289a5c269d12262764a7aba716f48e /src
parent98c5a70c17416e470544a4b597461771d5a36325 (diff)
downloadwhich-ui-b301bf24c5037403a1e5fc32fc8c10794941b528.tar.gz
hotfix: ignore clicks while modal open
Diffstat (limited to 'src')
-rw-r--r--src/pages/FeedPage/PollSubmissionImage.tsx6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/pages/FeedPage/PollSubmissionImage.tsx b/src/pages/FeedPage/PollSubmissionImage.tsx
index 1e9fa0e..8d82d45 100644
--- a/src/pages/FeedPage/PollSubmissionImage.tsx
+++ b/src/pages/FeedPage/PollSubmissionImage.tsx
@@ -38,8 +38,10 @@ const PollSubmissionImage: React.FC<PropTypes> = ({ url, setUrl }) => {
const [isMediaHover, setIsMediaHover] = useState(false);
const handleClick = (): void => {
- if (url) setUrl('');
- else setIsModalOpen(!isModalOpen);
+ if (!isModalOpen) {
+ if (url) setUrl('');
+ else setIsModalOpen(!isModalOpen);
+ };
};
const handleMouseEnter = (): void => {