diff --git a/src/components/FeaturedVideo.tsx b/src/components/FeaturedVideo.tsx index 5ab69c7..c6e4a03 100644 --- a/src/components/FeaturedVideo.tsx +++ b/src/components/FeaturedVideo.tsx @@ -36,7 +36,7 @@ function FeaturedVideo({ referrerPolicy, btnRounded, }: VideoInputProps) { - const vid = "https://www.youtube.com/watch?v=2nlSD0zD8Gk"; + const vid = "https://www.youtube.com/watch?v=u2zbcZBI0Do"; const [videoData, setVideoData] = useState(); const [videos, setVideos] = useState([vid]); @@ -46,9 +46,13 @@ function FeaturedVideo({ return limitedSentences; }; + const backgroundVideo = vid; + const videoID = backgroundVideo.split("v=")[1]; + const url = backgroundVideo.replace("watch?v=", "embed/"); + useEffect(() => { fetch( - `https://www.googleapis.com/youtube/v3/videos?id=2nlSD0zD8Gk&key=AIzaSyAi1dPx0fqC8EP9YoaNo1WPsykq_yVczCY&part=snippet,contentDetails,statistics,status®ionCode=us`, + `https://www.googleapis.com/youtube/v3/videos?id=${videoID}&key=AIzaSyAi1dPx0fqC8EP9YoaNo1WPsykq_yVczCY&part=snippet,contentDetails,statistics,status®ionCode=us`, { method: "GET", headers: { @@ -83,10 +87,6 @@ function FeaturedVideo({ ); }, []); - const backgroundVideo = vid; - const videoID = backgroundVideo.split("v=")[1]; - const url = backgroundVideo.replace("watch?v=", "embed/"); - const cardStyle: React.CSSProperties = { display: "flex", flexDirection: "column",