From d4771158280614a542ede0a85c868471790424f9 Mon Sep 17 00:00:00 2001 From: mayuran-deriv-dev96 Date: Mon, 15 Apr 2024 18:23:05 +0400 Subject: [PATCH] fix: bugs --- crowdin/messages.json | 2 +- .../features/components/quill/videoModal/index.tsx | 13 ++++++++++++- .../what-are-accumulatr-options/index.tsx | 2 +- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/crowdin/messages.json b/crowdin/messages.json index 98baa615535..83bfab977d2 100644 --- a/crowdin/messages.json +++ b/crowdin/messages.json @@ -3304,7 +3304,7 @@ "-1356285247": "Accumulator options icon", "-1500514644": "Accumulator", "-1167572902": "Secure your gains with manual or automatic profit-taking. With durations of up to 230 ticks, accumulator options are ideal for those looking for fast-paced, strategic trades while balancing risk and reward.", - "-677391007": "Deriv Go", + "-319687255": "Deriv GO", "-360691661": "Looking for a fast-paced, strategic and potentially explosive way to trade?", "-1759381505": "What are turbo options?", "-1461784880": "How do vanilla options work?", diff --git a/themes/gatsby-theme-deriv/src/features/components/quill/videoModal/index.tsx b/themes/gatsby-theme-deriv/src/features/components/quill/videoModal/index.tsx index bfe46ef56d1..52cd3dff627 100644 --- a/themes/gatsby-theme-deriv/src/features/components/quill/videoModal/index.tsx +++ b/themes/gatsby-theme-deriv/src/features/components/quill/videoModal/index.tsx @@ -1,4 +1,4 @@ -import React, { useCallback } from 'react' +import React, { useCallback, useEffect } from 'react' import ModalVideo from 'react-modal-video' interface VideoModalProps { @@ -10,6 +10,17 @@ interface VideoModalProps { const VideoModal = ({ video_id, isOpen, onClose }: VideoModalProps) => { const handleClose = useCallback(() => onClose(), [onClose]) + useEffect(() => { + if (isOpen) { + document.body.style.overflow = 'hidden'; + } else { + document.body.style.overflow = 'unset'; + } + return () => { + document.body.style.overflow = 'unset'; + }; + }, [isOpen]); + return ( - +