Skip to content

Commit

Permalink
title, view count, and description now match video
Browse files Browse the repository at this point in the history
  • Loading branch information
Efrain-Morales committed Jul 31, 2024
1 parent 1874281 commit ccd7960
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/components/FeaturedVideo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<VideoData>();
const [videos, setVideos] = useState<string[]>([vid]);

Expand All @@ -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&regionCode=us`,
`https://www.googleapis.com/youtube/v3/videos?id=${videoID}&key=AIzaSyAi1dPx0fqC8EP9YoaNo1WPsykq_yVczCY&part=snippet,contentDetails,statistics,status&regionCode=us`,
{
method: "GET",
headers: {
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit ccd7960

Please sign in to comment.