cleanup previous commit

This commit is contained in:
Jeremy Kauffman 2017-07-15 15:24:57 -04:00
parent a7195d12e1
commit 902b7f203c

View file

@ -45,12 +45,9 @@ class DiscoverPage extends React.PureComponent {
render() { render() {
const { featuredUris, fetchingFeaturedUris } = this.props; const { featuredUris, fetchingFeaturedUris } = this.props;
const failedToLoad = const hasContent =
!fetchingFeaturedUris && typeof featuredUris === "object" && Object.keys(featuredUris).length,
(featuredUris === undefined || failedToLoad = !fetchingFeaturedUris && !hasContent;
(featuredUris !== undefined && Object.keys(featuredUris).length === 0)),
hasContent =
typeof featuredUris === "object" && Object.keys(featuredUris).length;
return ( return (
<main <main
@ -60,7 +57,7 @@ class DiscoverPage extends React.PureComponent {
> >
{!hasContent && {!hasContent &&
fetchingFeaturedUris && fetchingFeaturedUris &&
<BusyMessage message={__("Fetching content")} style={busyStyle} />} <BusyMessage message={__("Fetching content")} />}
{hasContent && {hasContent &&
Object.keys(featuredUris).map( Object.keys(featuredUris).map(
category => category =>