stop loader timeout if not loading
This commit is contained in:
parent
402e63d27f
commit
90655a1dd5
2 changed files with 3 additions and 1 deletions
|
@ -41,6 +41,8 @@ class Page extends React.PureComponent<Props, State> {
|
|||
const { loading } = this.props;
|
||||
if (!this.loaderTimeout && !prevProps.loading && loading) {
|
||||
this.beginLoadingTimeout();
|
||||
} else if (!loading && this.loaderTimeout) {
|
||||
clearTimeout(this.loaderTimeout);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ import SubscriptionsPage from './view';
|
|||
const select = state => ({
|
||||
loading:
|
||||
selectIsFetchingSubscriptions(state) ||
|
||||
Object.keys(selectSubscriptionsBeingFetched(state)).length,
|
||||
Boolean(Object.keys(selectSubscriptionsBeingFetched(state)).length),
|
||||
subscriptionsBeingFetched: selectSubscriptionsBeingFetched(state),
|
||||
subscriptions: selectSubscriptions(state),
|
||||
subscriptionClaims: selectSubscriptionClaims(state),
|
||||
|
|
Loading…
Reference in a new issue