import PersonalVideo from "@/components/pages/ABDesign/v1/pages/TrialPayment/components/PersonalVideo"; import styles from "./styles.module.css"; import { useSchemeColorByElement } from "@/hooks/useSchemeColorByElement"; import { useCallback, useEffect, useRef, useState } from "react"; import { Outlet, useLocation } from "react-router-dom"; import { useDispatch, useSelector } from "react-redux"; import { actions, selectors } from "@/store"; import routes from "@/routes"; export interface IOutletContext { containerVideoRef: React.RefObject; isVisibleElements: boolean; setIsVisibleElements: (value: boolean) => void; setShowElements: (value: () => void) => void; } function LayoutABDesignV1() { const dispatch = useDispatch(); const location = useLocation(); const mainRef = useRef(null); useSchemeColorByElement(mainRef.current, "section.page, .page, section", [ location, ]); const [isVisibleElements, setIsVisibleElements] = useState(false); const { gender } = useSelector(selectors.selectQuestionnaire); const containerVideoRef = useRef(null); const showElementsTimer = useRef(); const showElements = useCallback(() => { showElementsTimer.current = setTimeout(() => { setIsVisibleElements(true); }, 33_000); }, [setIsVisibleElements]); useEffect(() => { if (location.pathname !== routes.client.trialChoiceVideoV1()) { dispatch(actions.personalVideo.updateIsVideoPlaying(false)); } }, [dispatch, location.pathname]); return ( <>
{/* }> */} {/* */}
); } export default LayoutABDesignV1;