diff --git a/documentation/src/components/HomepageFeatures/index.tsx b/documentation/src/components/HomepageFeatures/index.tsx index 544b6aa6..f8479d5b 100644 --- a/documentation/src/components/HomepageFeatures/index.tsx +++ b/documentation/src/components/HomepageFeatures/index.tsx @@ -1,5 +1,4 @@ import type { ReactNode } from "react"; -import { useEffect, useRef, useState } from "react"; import clsx from "clsx"; import Heading from "@theme/Heading"; import styles from "./styles.module.css"; @@ -165,32 +164,6 @@ function Quote({ name, github, role, testimonial }: FeatureQuote) { } export default function HomepageFeatures(): ReactNode { - const videoRef = useRef(null); - const [videoLoaded, setVideoLoaded] = useState(false); - - useEffect(() => { - const observer = new IntersectionObserver( - (entries) => { - entries.forEach((entry) => { - if (entry.isIntersecting && !videoLoaded) { - setVideoLoaded(true); // Load video only when it first appears - } - }); - }, - { threshold: 0.5 } - ); - - if (videoRef.current) { - observer.observe(videoRef.current); - } - - return () => { - if (videoRef.current) { - observer.unobserve(videoRef.current); - } - }; - }, [videoLoaded]); - return (
@@ -217,29 +190,24 @@ export default function HomepageFeatures(): ReactNode {