From 6c766c3c339c342c3cc56ddd712340d0bc20c8bf Mon Sep 17 00:00:00 2001 From: Giampiero Galeazzi Date: Sun, 17 Feb 2019 16:26:40 +0100 Subject: [PATCH] aggiustamenti vari da poco -greg ghei --- src/VideoInfo.js | 19 +------------------ src/reccomenders/Random.js | 2 -- 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/src/VideoInfo.js b/src/VideoInfo.js index 6ed6231..97a1ad6 100644 --- a/src/VideoInfo.js +++ b/src/VideoInfo.js @@ -28,7 +28,7 @@ class VideoInfo extends React.Component { return moment(a, moment.ISO_8601).format('ddd, DD/MM/YYYY hh:mm:ss'); } - getInfoComments() { + componentDidMount() { return axios.all([ axios.get('https://www.googleapis.com/youtube/v3/videos', { //Richiesta per tutte le info sul video params: { @@ -59,20 +59,6 @@ class VideoInfo extends React.Component { }); } - // static getDerivedStateFromProps(nextProps, prevState) { - - // } - componentDidMount() { - this.getInfoComments(); - } - - // componentDidUpdate(prevProps, prevState, snapshot) { - - // } - - // shouldComponentUpdate(nextProps, nextState) { - // } - render() { const { error, isLoaded, VideoDetails, comments } = this.state; const momentDuration = this.momentDuration; @@ -132,9 +118,6 @@ class VideoInfo extends React.Component { ) })} - - {/* Insert code here */} -