From 746c239f03e2321fdddae53846aea56ad6bf479b Mon Sep 17 00:00:00 2001
From: matteo
Date: Sun, 17 Feb 2019 16:41:29 +0100
Subject: [PATCH] temporary
---
src/VideoInfo.js | 26 +++++++++++++-------------
src/Wikipedia.js | 3 +++
2 files changed, 16 insertions(+), 13 deletions(-)
diff --git a/src/VideoInfo.js b/src/VideoInfo.js
index 4fcc0fb..072d1ea 100644
--- a/src/VideoInfo.js
+++ b/src/VideoInfo.js
@@ -1,7 +1,7 @@
import React from 'react';
import Wikipedia from './Wikipedia';
import { Card, Tabs, Tab } from 'react-bootstrap';
-import {Link} from 'react-router-dom';
+import { Link } from 'react-router-dom';
import axios from 'axios';
import Linkify from "react-linkify";
import moment from 'moment';
@@ -67,12 +67,12 @@ class VideoInfo extends React.Component {
}
// componentDidUpdate(prevProps, prevState, snapshot) {
-
+
// }
// shouldComponentUpdate(nextProps, nextState) {
// }
-
+
render() {
const { error, isLoaded, VideoDetails, comments } = this.state;
const momentDuration = this.momentDuration;
@@ -80,7 +80,7 @@ class VideoInfo extends React.Component {
if (error) {
return (
- {}
+ {}
Error: {error.message} -- Cannot get {error.config.url}
);
@@ -98,8 +98,8 @@ class VideoInfo extends React.Component {
Channel name: {VideoDetails.snippet.channelTitle}
Description: {VideoDetails.snippet.description}
Tags: {VideoDetails.snippet.tags ?
- VideoDetails.snippet.tags.map((tag,i) =>
- ( {tag}{" "} ))
+ VideoDetails.snippet.tags.map((tag, i) =>
+ ({tag}{" "}))
: ""}
@@ -136,13 +136,13 @@ class VideoInfo extends React.Component {
{/* Insert code here */}
-
diff --git a/src/Wikipedia.js b/src/Wikipedia.js
index 76388a1..86dd993 100644
--- a/src/Wikipedia.js
+++ b/src/Wikipedia.js
@@ -40,6 +40,9 @@ class Wikipedia extends Component {
wikidatakeys: Object.keys(wikidatatmp.claims),
isWDataLoaded: true
});
+ wdk.getManyEntities(Object.keys(wikidatatmp.claims), 'en').then(
+ res=> console.info(res,'eee')
+ )
if (wikidatatmp.sitelinks.enwiki)
wikijs()
.page(wikidatatmp.sitelinks.enwiki.title)