From 169bf13dfc6bb419862f6378df1845c95b2a2b53 Mon Sep 17 00:00:00 2001 From: Zack Stickles Date: Fri, 12 Jun 2020 10:20:57 -0700 Subject: [PATCH 1/3] feat: adds the (optional) ability to have other content in intro --- src/components/Intro.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/components/Intro.js b/src/components/Intro.js index cfb7a9571..e943a4265 100644 --- a/src/components/Intro.js +++ b/src/components/Intro.js @@ -4,14 +4,20 @@ import PropTypes from 'prop-types'; import styles from './Intro.module.scss'; -const Intro = ({ children }) => ( - +const Intro = ({ children, type }) => ( + {children} ); Intro.propTypes = { children: PropTypes.node.isRequired, + // Only video or code is supported at the moment + type: PropTypes.oneOf('Video', 'pre'), +}; + +Intro.defaultProps = { + type: 'Video', }; export default Intro; From 8f6183cca5a57953006e0b3a544c59811417cd2b Mon Sep 17 00:00:00 2001 From: Zack Stickles Date: Fri, 12 Jun 2020 10:25:11 -0700 Subject: [PATCH 2/3] chore: ensuring only specific video platforms are used --- src/components/Video.js | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/src/components/Video.js b/src/components/Video.js index 128d83281..2f123525a 100644 --- a/src/components/Video.js +++ b/src/components/Video.js @@ -3,27 +3,26 @@ import PropTypes from 'prop-types'; import styles from './Video.module.scss'; -const Video = ({ id, type, title }) => { - const src = { - youtube: `//www.youtube.com/embed/${id}?modestbranding=1`, - wistia: `//fast.wistia.net/embed/iframe/${id}`, - }; - return ( -
-