This repository has been archived by the owner on Dec 24, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
res0nanz
committed
Feb 27, 2019
1 parent
3402869
commit 2168db0
Showing
7 changed files
with
56 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import React from 'react' | ||
import PropTypes from 'prop-types' | ||
|
||
const Video = ({ path }) => ( | ||
<video width="500" height="300" controls loop> | ||
<source src={path}/> | ||
</video> | ||
) | ||
|
||
Video.protoTypes = { | ||
path: PropTypes.string.isRequired | ||
} | ||
|
||
export default Video |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import React from 'react' | ||
import PropTypes from 'prop-types' | ||
import Video from './Video' | ||
|
||
const VideosListView = ({ videos }) => ( | ||
videos.map((video, index) => ( | ||
<Video key={index} path={video.path} /> | ||
)) | ||
) | ||
|
||
VideosListView.propTypes = { | ||
videos: PropTypes.arrayOf({ | ||
path: PropTypes.string.isRequired | ||
}) | ||
} | ||
|
||
export default VideosListView |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { connect } from 'react-redux' | ||
import VideoListView from '../components/VideosListView' | ||
|
||
const mapStateToProps = state => { | ||
return { | ||
videos: state | ||
} | ||
} | ||
|
||
const mapDispatchToProps = dispatch => { | ||
return {} | ||
} | ||
|
||
const LoadVideo = connect( | ||
mapStateToProps, | ||
mapDispatchToProps | ||
)(VideoListView) | ||
|
||
export default LoadVideo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters