From 34f39d025344897a47ed047a1a7d6e3a93f67acc Mon Sep 17 00:00:00 2001 From: Ahmed-Ayman Date: Thu, 6 Dec 2018 17:22:03 +0200 Subject: [PATCH] import util.getThumbnail in the video item. --- src/components/VideoItem.js | 26 +++++++++++++++++--------- src/utils/api.js | 1 - 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/src/components/VideoItem.js b/src/components/VideoItem.js index 1f61ea9..b48fb58 100644 --- a/src/components/VideoItem.js +++ b/src/components/VideoItem.js @@ -1,12 +1,20 @@ import React from 'react'; -class VideoItem extends React.Component{ -render(){ - return( -
- -

Titleeeee #1

-
- ) +import PropTypes from 'prop-types'; +import {getThumbnail} from '../utils/video'; +class VideoItem extends React.Component { + + render() { + return ( +
+ +

Random Title

+
+ ) + } } + +VideoItem.propTypes = { + id: PropTypes.string, + title: PropTypes.string, } -export default (VideoItem); \ No newline at end of file +export default (VideoItem); \ No newline at end of file diff --git a/src/utils/api.js b/src/utils/api.js index df73729..d931634 100644 --- a/src/utils/api.js +++ b/src/utils/api.js @@ -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); }