import routes from "@/routes"; import { actions } from "@/store"; import { useDispatch } from "react-redux"; import { Outlet, useLocation } from "react-router-dom"; import { useEffect, useRef, useState } from "react"; export interface IOutletContext { containerVideoRef: React.RefObject; isVisibleElements: boolean; setIsVisibleElements: (value: boolean) => void; setShowElements: (value: () => void) => void; } function LayoutPersonalVideo() { const dispatch = useDispatch(); const location = useLocation(); // const { gender } = useSelector(selectors.selectQuestionnaire); const [isVisibleElements, _setIsVisibleElements] = useState(false); // const showElementsTimer = useRef(); const containerVideoRef = useRef(null); // const locale = getDefaultLocaleByLanguage(language); // const videoUrl = // locale === "es" // ? "/trial-choice-palmistry-es.mp4" // : "/trial-choice-palmistry.mp4"; // const showElements = useCallback(() => { // showElementsTimer.current = setTimeout(() => { // setIsVisibleElements(true); // }, 29_000); // }, [setIsVisibleElements]); useEffect(() => { if (location.pathname !== routes.client.compatibilityV4TrialChoiceVideo()) { dispatch(actions.personalVideo.updateIsVideoPlaying(false)); } }, [dispatch, location.pathname]); return ( <> {/* */} ); } export default LayoutPersonalVideo;