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