Merge pull request #159 from 6ea86b96/bug/error-message
Stop landing page content loading error from displaying all the time
This commit is contained in:
commit
db8201e43c
1 changed files with 5 additions and 1 deletions
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue