Stop landing page content loading error from displaying all the time

This commit is contained in:
6ea86b96 2017-05-30 12:26:41 +04:00
parent 5a552761da
commit 5aca89ab63

View file

@ -33,6 +33,10 @@ class DiscoverPage extends React.Component{
featuredUris,
fetchingFeaturedUris,
} = this.props
const failedToLoad = !fetchingFeaturedUris && (
featuredUris === undefined ||
(featuredUris !== undefined && Object.keys(featuredUris).length === 0)
)
return (
<main>
@ -47,7 +51,7 @@ class DiscoverPage extends React.Component{
))
}
{
typeof featuredUris !== undefined &&
failedToLoad &&
<div className="empty">Failed to load landing content.</div>
}
</main>