Archived
wikipedia integration
This commit is contained in:
+6
-1
@@ -5,6 +5,7 @@ import {Col, Tabs, Tab, ListGroup, ListGroupItem} from 'react-bootstrap';
|
||||
import axios from 'axios';
|
||||
import Linkify from "react-linkify";
|
||||
import Card from "react-bootstrap/lib/Card";
|
||||
const ytclear = require('@c0b41/ytclear');
|
||||
|
||||
class VideoInfo extends Component {
|
||||
constructor(props) {
|
||||
@@ -37,7 +38,11 @@ class VideoInfo extends Component {
|
||||
}
|
||||
}).then(response => {
|
||||
this.setState({
|
||||
VideoDetails: response.data.items,
|
||||
VideoDetails: response.data.items,
|
||||
others: {
|
||||
artist: ytclear(response.data.items[0].snippet.title).split('-')[0],
|
||||
title: ytclear(response.data.items[0].snippet.title).split('-')[1]
|
||||
},
|
||||
isLoaded: true});
|
||||
}, error => {
|
||||
console.error(error);
|
||||
|
||||
Reference in New Issue
Block a user