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