-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #44 from WorldBank-Transport/fix/errors
Misc bug fixes
- Loading branch information
Showing
15 changed files
with
42 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,13 +2,13 @@ | |
title: QXN Test | ||
country: CN | ||
date: 2018-09-24T00:00:00.000Z | ||
include_results: false | ||
authors: | ||
- QL | ||
topics: | ||
- test for the QXN RAH | ||
contact: | ||
name: QL | ||
email: [email protected] | ||
contact_name: QL | ||
contact_email: [email protected] | ||
|
||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -94,11 +94,35 @@ class Home extends React.Component { | |
} | ||
|
||
render () { | ||
const {fetching, fetched, data} = this.props.projects | ||
const {fetching, fetched, data, error} = this.props.projects | ||
const projectsToShow = this.pageSize * this.state.page | ||
|
||
if (!fetched || fetching) return null | ||
|
||
if (error) { | ||
return ( | ||
<App> | ||
<section className='inpage inpage--uhoh'> | ||
<header className='inpage__header'> | ||
<div className='inner'> | ||
<div className='inpage__headline'> | ||
<h1 className='inpage__title'>An error occurred</h1> | ||
</div> | ||
</div> | ||
</header> | ||
<div className='inpage__body'> | ||
<div className='inner'> | ||
<div className='prose'> | ||
<p>An error occurred trying to reach the server. Please try again later.</p> | ||
<p>In the mean time visit the <Link to='/about' title='Visit about page'>about page</Link> for more information or if the error persists <a href='mailto:[email protected]' title='Get in touch'>contact us</a> about the problem.</p> | ||
</div> | ||
</div> | ||
</div> | ||
</section> | ||
</App> | ||
) | ||
} | ||
|
||
const { year, country, topic } = this.state.activeFilters | ||
const projectsFiltered = data.index | ||
.filter(proj => { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters