forked from uc-cdis/data-portal
-
Notifications
You must be signed in to change notification settings - Fork 4
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 #106 from chicagopcdc/pcdc_dev
Pcdc dev
- Loading branch information
Showing
14 changed files
with
2,219 additions
and
4,711 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import React from 'react'; | ||
import NotFoundSVG from '../../img/not-found.svg'; | ||
|
||
class ExplorerErrorBoundary extends React.Component { | ||
constructor(props) { | ||
super(props); | ||
this.state = { hasError: false }; | ||
} | ||
static getDerivedStateFromError(error) { | ||
return { hasError: true }; | ||
} | ||
componentDidCatch(error, errorInfo) { | ||
console.error('Explorer has error:', error, errorInfo); | ||
} | ||
render() { | ||
return this.state.hasError ? ( | ||
<div className='guppy-data-explorer__error'> | ||
<h1>Error opening the Exploration page...</h1> | ||
<p> | ||
The Exploration page is not working correctly. Please try refreshing | ||
the page. If the problem continues, please contact administrator for | ||
more information. | ||
</p> | ||
<NotFoundSVG /> | ||
</div> | ||
) : ( | ||
this.props.children | ||
); | ||
} | ||
} | ||
|
||
export default ExplorerErrorBoundary; |
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
Oops, something went wrong.