Tidying up load checkers
This commit is contained in:
@ -486,9 +486,10 @@ class Artist extends React.Component {
|
||||
history,
|
||||
} = this.props;
|
||||
|
||||
if (loading) {
|
||||
return <Loader body loading />;
|
||||
} else if (!artist) {
|
||||
if (!artist) {
|
||||
if (loading) {
|
||||
return <Loader body loading />;
|
||||
}
|
||||
return (
|
||||
<ErrorMessage type="not-found" title="Not found">
|
||||
<p>
|
||||
@ -604,7 +605,7 @@ class Artist extends React.Component {
|
||||
|
||||
const mapStateToProps = (state, ownProps) => {
|
||||
const uri = decodeURIComponent(ownProps.match.params.uri);
|
||||
const loadingSelector = makeLoadingSelector([`(.*)${uri}(.*)`, '^((?!contains).)*$', '^((?!/albums).)*$', '^((?!related-artists).)*$', '^((?!top-tracks).)*$']);
|
||||
const loadingSelector = makeLoadingSelector([`(.*)${uri}(.*)`, '^((?!contains).)*$', '^((?!albums).)*$', '^((?!related-artists).)*$', '^((?!top-tracks).)*$']);
|
||||
const artistSelector = makeItemSelector(uri);
|
||||
const artist = artistSelector(state);
|
||||
let albums = null;
|
||||
|
||||
Reference in New Issue
Block a user