Skip to content

Commit

Permalink
upgrade to react-youtube v10 and rename props
Browse files Browse the repository at this point in the history
  • Loading branch information
fturmel committed Dec 7, 2022
1 parent 41ad773 commit b8245a9
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 51 deletions.
52 changes: 10 additions & 42 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"react-helmet": "^6.1.0",
"react-icons": "^4.7.1",
"react-select": "^5.7.0",
"react-youtube": "^7.14.0",
"react-youtube": "^10.1.0",
"remark-gfm": "^1.0.0",
"yup": "^0.32.11"
},
Expand Down
4 changes: 2 additions & 2 deletions src/components/Question.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ const Question = ({ variant, slug, question, answer, currentHash }) => {
)}
{answer.video && (
<YouTubeVideo
containerClassName={css.videoContainer}
className={css.video}
className={css.videoContainer}
iframeClassName={css.video}
videoId={answer.video.id}
listId={answer.video.list}
/>
Expand Down
6 changes: 3 additions & 3 deletions src/components/YouTubeVideo.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import cn from 'classnames';
import * as css from './YouTubeVideo.module.css';

const YouTubeVideo = ({
containerClassName,
className,
iframeClassName,
videoId,
listId,
timestamp
Expand All @@ -35,8 +35,8 @@ const YouTubeVideo = ({
return (
<div key={videoId}>
<YouTube
containerClassName={cn(css.container, containerClassName)}
className={cn(css.video, className)}
className={cn(css.container, className)}
iframeClassName={cn(css.video, iframeClassName)}
ref={youTubeVideo}
videoId={videoId}
opts={opts}
Expand Down
2 changes: 1 addition & 1 deletion src/components/challenges/VideoSection.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ const VideoSection = ({ challenge }) => {
<div className={css.videoContainer}>
<div className={css.video} ref={youTubeVideoRef}>
<YouTubeVideo
containerClassName={css.videoWrapper}
className={css.videoWrapper}
videoId={videoId}
timestamp={timestamp}
/>
Expand Down
2 changes: 1 addition & 1 deletion src/components/tracks/VideoSection.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ const VideoSection = ({ track, video, trackPosition, mainTitle }) => {
<div className={css.videoContainer}>
<div className={css.video} ref={youTubeVideoRef}>
<YouTubeVideo
containerClassName={css.videoWrapper}
className={css.videoWrapper}
videoId={videoId}
timestamp={timestamp}
/>
Expand Down
2 changes: 1 addition & 1 deletion src/templates/guide.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ const components = (localImages) => ({
),
Video: (props) => (
<div className={css.video}>
<YouTubeVideo containerClassName={css.videoContainer} {...props} />
<YouTubeVideo className={css.videoContainer} {...props} />
</div>
),
PassengerShowcaseForm: (props) => <PassengerShowcaseForm {...props} />
Expand Down

0 comments on commit b8245a9

Please sign in to comment.