From fb4f5719431fc0134b347b920e08302234708911 Mon Sep 17 00:00:00 2001 From: Ajinkya Pande Date: Mon, 25 Nov 2024 15:40:18 +0530 Subject: [PATCH 1/3] Issueid #231004 feat:play youtube help video in mylearning iframe --- src/components/Assesment/Assesment.jsx | 58 ++++---------------------- 1 file changed, 9 insertions(+), 49 deletions(-) diff --git a/src/components/Assesment/Assesment.jsx b/src/components/Assesment/Assesment.jsx index 3d07ef07..c9142c85 100644 --- a/src/components/Assesment/Assesment.jsx +++ b/src/components/Assesment/Assesment.jsx @@ -647,14 +647,16 @@ const Assesment = ({ discoverStart }) => { const { virtualId } = useSelector((state) => state.user); - const [isVideoOpen, setIsVideoOpen] = useState(false); - const handleOpenVideo = () => { - setIsVideoOpen(true); - }; - - const handleCloseVideo = () => { - setIsVideoOpen(false); + if (process.env.REACT_APP_SHOW_HELP_VIDEO === "true") { + window.parent.postMessage( + { + helpVideo: process.env.REACT_APP_SHOW_HELP_VIDEO_LINK, + message: "help-video-link", + }, + "*" + ); + } }; const navigate = useNavigate(); @@ -855,48 +857,6 @@ const Assesment = ({ discoverStart }) => { )} - {/* Video Modal */} - - -