From b301bf24c5037403a1e5fc32fc8c10794941b528 Mon Sep 17 00:00:00 2001
From: eug-vs <eug-vs@keemail.me>
Date: Mon, 29 Jun 2020 22:36:57 +0300
Subject: hotfix: ignore clicks while modal open

---
 src/pages/FeedPage/PollSubmissionImage.tsx | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

(limited to 'src/pages/FeedPage/PollSubmissionImage.tsx')

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 => {
-- 
cgit v1.2.3

