From f4d76e0060693268dc7e87033bdad9ce60902bd3 Mon Sep 17 00:00:00 2001 From: tony Date: Tue, 18 Apr 2023 09:31:17 -0700 Subject: [PATCH] Modified the prop naming for the videoButton component so now the passed props are working with youtube video id. --- Components/Buttons/video-button.jsx | 4 ++-- Components/Layout/section.jsx | 4 ++-- pages/index.js | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Components/Buttons/video-button.jsx b/Components/Buttons/video-button.jsx index 26da0f4..0c1cc6f 100644 --- a/Components/Buttons/video-button.jsx +++ b/Components/Buttons/video-button.jsx @@ -2,7 +2,7 @@ import React, { useState } from "react"; import ModalVideo from "react-modal-video"; import "react-modal-video/scss/modal-video.scss"; -const VideoButton = ({ link, buttonOneText }) => { +const VideoButton = ({ videoId, buttonOneText }) => { const [isOpen, setIsOpen] = useState(false); const openModal = () => { @@ -17,7 +17,7 @@ const VideoButton = ({ link, buttonOneText }) => { setIsOpen(false)} /> diff --git a/Components/Layout/section.jsx b/Components/Layout/section.jsx index 90c4438..b581e75 100644 --- a/Components/Layout/section.jsx +++ b/Components/Layout/section.jsx @@ -1,6 +1,6 @@ import React, { useEffect, useRef, useState } from "react"; import VideoButton from "/home/clyde/Code/shiloh/Components/Buttons/video-button.jsx"; -const Section = ({ videoUrl, text, videoID, buttonOneText, buttonTwoText }) => { +const Section = ({ videoUrl, text, videoId, buttonOneText, buttonTwoText }) => { const videoRef = useRef(null); const [isPlaying, setIsPlaying] = useState(false); @@ -45,7 +45,7 @@ const Section = ({ videoUrl, text, videoID, buttonOneText, buttonTwoText }) => {

{text}

- + diff --git a/pages/index.js b/pages/index.js index dca18f7..6adb367 100644 --- a/pages/index.js +++ b/pages/index.js @@ -11,7 +11,7 @@ export default function Home() { videoUrl="https://vid.puffyan.us/latest_version?id=--khbXchTeE&itag=22" text="redemptive tech in Jesus' name" buttonTwoText="learn more" - buttonOneText="Watch" videoId="khbXchTeE" + buttonOneText="Watch" videoId="uu01xBw_BVE" />