aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 => {