diff --git a/docusaurus.config.ts b/docusaurus.config.ts index da14145d82..5fb5d2cfd8 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -20,6 +20,7 @@ export default { "data-accountid": "CZPG9aVdtk59Tjz4SMTu8w==", "data-websiteid": "75VGI0NlBqessD4BQn2pFg==", src: "https://app.robofy.ai/bot/js/common.js?v=" + new Date().getTime(), + defer: "true", }, }, { @@ -61,7 +62,7 @@ export default { }, }, future: { - experimental_faster: false, // Required for faster production builds. For reference: https://docusaurus.io/blog/releases/3.6#adoption-strategy + experimental_faster: true, // Required for faster production builds. For reference: https://docusaurus.io/blog/releases/3.6#adoption-strategy }, presets: [ [ diff --git a/src/components/home/IntroductionVideo/index.tsx b/src/components/home/IntroductionVideo/index.tsx index 70e2a429ba..dd236427ab 100644 --- a/src/components/home/IntroductionVideo/index.tsx +++ b/src/components/home/IntroductionVideo/index.tsx @@ -1,4 +1,4 @@ -import React, {useRef} from "react" +import React, {useRef, useState} from "react" import {useCookieConsent} from "@site/src/utils/hooks/useCookieConsent" import "./style.css" @@ -7,22 +7,47 @@ const IntroductionVideo: React.FC = () => { const videoRef = useRef(null) const {getCookieConsent} = useCookieConsent() const cookieConsent = getCookieConsent() + const [isIframeLoaded, setIsIframeLoaded] = useState(false) const handleVimeoAnalytics = () => { return Boolean(cookieConsent?.accepted) ? "" : "&dnt=1" } + const handlePlayClick = () => { + setIsIframeLoaded(true) + } + return (
-