This commit is contained in:
matteo
2019-02-19 01:38:10 +01:00
parent 5f86943496
commit aabf86e3d7
5 changed files with 60 additions and 35 deletions
+7 -6
View File
@@ -154,7 +154,7 @@ class Wikipedia extends Component {
else { //oof
axios.get(`${musicbrainzBaseUrl}/work`, {
params: {
'query': 'undefined' === typeof this.props.title ? this.props.title2 : this.props.title,
'query': 'undefined' === typeof this.props.title ? 'undefined' === typeof this.props.title2 ? this.props.artist2 : this.props.title2 : this.props.title,
'limit': 1,
'offset': 0,
'fmt': 'json'
@@ -221,12 +221,13 @@ class Wikipedia extends Component {
return <React.Fragment>Error: {error.message}</React.Fragment>;
} else if (!this.state.isLoaded) {
return <Col className="text-center">
<div class="lds-ellipsis"><div></div><div></div><div></div><div></div></div>
<div className="lds-ellipsis"><div></div><div></div><div></div><div></div></div>
</Col>;
} else {
return (<>
{/* {isWikiLoaded && wikipedia.desc} */}
<Table bordered variant="dark" hover size="sm">
return (
// <>
// {isWikiLoaded && wikipedia.desc}
<Table size="sm">
<tbody>
{isWikiLoaded &&
this.state.wikipediakeys.map(key => (
@@ -276,7 +277,7 @@ class Wikipedia extends Component {
}
</tbody>
</Table>
</>
// </>
);
}
}