show loader when loading prop is true

This commit is contained in:
Travis Eden 2018-06-19 15:52:14 -04:00 committed by Sean Yesmunt
parent 49700d5906
commit 324dc3fa4f

View file

@ -69,7 +69,7 @@ class Page extends React.PureComponent<Props, State> {
// We don't want to show the loading spinner right away if it will only flash on the
// screen for a short time, wait until we know it will be loading for a bit before showing it
const shouldShowLoader = !isShowingChildren(children) && showLoader;
const shouldShowLoader = loading || (!isShowingChildren(children) && showLoader);
return (
<main