Tidying up load checkers

This commit is contained in:
James Barnsley
2021-02-01 11:16:31 +13:00
parent 1c6426d568
commit a58d4ba56e
18 changed files with 2151 additions and 1124 deletions

View File

@ -213,9 +213,10 @@ class Album extends React.Component {
filter,
} = this.state;
if (loading) {
return <Loader body loading />;
} else if (!album) {
if (!album) {
if (loading) {
return <Loader body loading />;
}
return (
<ErrorMessage type="not-found" title="Not found">
<p>
@ -366,7 +367,7 @@ class Album extends React.Component {
const mapStateToProps = (state, ownProps) => {
const uri = decodeURIComponent(ownProps.match.params.uri);
const itemSelector = makeItemSelector(uri);
const loadingSelector = makeLoadingSelector([`(.*)${uri}(.*)`, '^((?!contains).)*$', '^((?!me/albums).)*$']);
const loadingSelector = makeLoadingSelector([`(.*)${uri}(.*)`, '^((?!contains).)*$', '^((?!me\/albums).)*$']);
return {
uri,
slim_mode: state.ui.slim_mode,