Archived
merge
This commit is contained in:
+1
-18
@@ -28,7 +28,7 @@ class VideoInfo extends React.Component {
|
|||||||
return moment(a, moment.ISO_8601).format('ddd, DD/MM/YYYY hh:mm:ss');
|
return moment(a, moment.ISO_8601).format('ddd, DD/MM/YYYY hh:mm:ss');
|
||||||
}
|
}
|
||||||
|
|
||||||
getInfoComments() {
|
componentDidMount() {
|
||||||
return axios.all([
|
return axios.all([
|
||||||
axios.get('https://www.googleapis.com/youtube/v3/videos', { //Richiesta per tutte le info sul video
|
axios.get('https://www.googleapis.com/youtube/v3/videos', { //Richiesta per tutte le info sul video
|
||||||
params: {
|
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() {
|
render() {
|
||||||
const { error, isLoaded, VideoDetails, comments } = this.state;
|
const { error, isLoaded, VideoDetails, comments } = this.state;
|
||||||
const momentDuration = this.momentDuration;
|
const momentDuration = this.momentDuration;
|
||||||
@@ -132,9 +118,6 @@ class VideoInfo extends React.Component {
|
|||||||
)
|
)
|
||||||
})}
|
})}
|
||||||
</Tab>
|
</Tab>
|
||||||
<Tab className="text-white" eventKey="tweet" title="Tweet">
|
|
||||||
{/* Insert code here */}
|
|
||||||
</Tab>
|
|
||||||
<Tab className="text-white" eventKey="wikipedia" title="Wikipedia">
|
<Tab className="text-white" eventKey="wikipedia" title="Wikipedia">
|
||||||
<Wikipedia
|
<Wikipedia
|
||||||
title={'undefined' !== typeof this.props.location.state ? this.props.location.state.title : undefined}
|
title={'undefined' !== typeof this.props.location.state ? this.props.location.state.title : undefined}
|
||||||
|
|||||||
@@ -10,8 +10,6 @@ class RecommenderRandom extends Component{
|
|||||||
items : [],
|
items : [],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ISO_8601parse(a) {
|
ISO_8601parse(a) {
|
||||||
return moment(a, moment.ISO_8601).format('ddd, DD/MM/YYYY hh:mm:ss');
|
return moment(a, moment.ISO_8601).format('ddd, DD/MM/YYYY hh:mm:ss');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ class Related extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
componentDidUpdate(prevProps,prevState){
|
componentDidUpdate(prevProps,prevState){
|
||||||
if (prevProps.match.params.videoId !== this.state.videoId){
|
if (prevProps.match.params.id !== this.props.match.params.id){
|
||||||
axios.get("https://www.googleapis.com/youtube/v3/search",{
|
axios.get("https://www.googleapis.com/youtube/v3/search",{
|
||||||
params:{
|
params:{
|
||||||
'part': 'snippet',
|
'part': 'snippet',
|
||||||
|
|||||||
Reference in New Issue
Block a user