import util.getThumbnail in the video item.

This commit is contained in:
Ahmed-Ayman 2018-12-06 17:22:03 +02:00
parent c2bce65dce
commit 34f39d0253
2 changed files with 17 additions and 10 deletions

View File

@ -1,12 +1,20 @@
import React from 'react';
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/img1.png')} alt=""/>
<h3 className="video-title">Titleeeee #1</h3>
<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);

View File

@ -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);
}