import util.getThumbnail in the video item.
This commit is contained in:
parent
c2bce65dce
commit
34f39d0253
|
@ -1,12 +1,20 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
class VideoItem extends React.Component{
|
import PropTypes from 'prop-types';
|
||||||
render(){
|
import {getThumbnail} from '../utils/video';
|
||||||
return(
|
class VideoItem extends React.Component {
|
||||||
<section className="video-item">
|
|
||||||
<img className="video-thumbnail" src={require('../assets/images/img1.png')} alt=""/>
|
render() {
|
||||||
<h3 className="video-title">Titleeeee #1</h3>
|
return (
|
||||||
</section>
|
<section className="video-item">
|
||||||
)
|
<img className="video-thumbnail" src={require('../assets/images/img2.png')} alt=""/>
|
||||||
|
<h3 className="video-title">Random Title</h3>
|
||||||
|
</section>
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
VideoItem.propTypes = {
|
||||||
|
id: PropTypes.string,
|
||||||
|
title: PropTypes.string,
|
||||||
}
|
}
|
||||||
export default (VideoItem);
|
export default (VideoItem);
|
|
@ -202,7 +202,6 @@ export function fetchRandomPlace() {
|
||||||
return callApi('findPlaces', data).then(data => data.items[0]);
|
return callApi('findPlaces', data).then(data => data.items[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export function fetchVideosByPlace(placeId, startRange=0, endRange=100, sortKey='random') {
|
export function fetchVideosByPlace(placeId, startRange=0, endRange=100, sortKey='random') {
|
||||||
return fetchVideosByX('place', placeId, startRange, endRange, sortKey);
|
return fetchVideosByX('place', placeId, startRange, endRange, sortKey);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user