Add Error Boundary for

- the Page component
- the Main component
This commit is contained in:
Mohamed Karray
2019-03-13 21:41:08 +01:00
parent 35c84c929a
commit 13e7ae24bd
5 changed files with 124 additions and 125 deletions

View File

@@ -7,7 +7,7 @@ import Subtitle from "./Subtitle";
import injectSheet from "react-jss";
import classNames from "classnames";
import PageActions from "./PageActions";
import PageErrorBoundary from "../errorboundary/PageErrorBoundary";
import ErrorBoundary from "../ErrorBoundary";
type Props = {
title?: string,
@@ -32,7 +32,7 @@ class Page extends React.Component<Props> {
render() {
const { error } = this.props;
return (
<PageErrorBoundary>
<ErrorBoundary>
<section className="section">
<div className="container">
{this.renderPageHeader()}
@@ -40,7 +40,7 @@ class Page extends React.Component<Props> {
{this.renderContent()}
</div>
</section>
</PageErrorBoundary>
</ErrorBoundary>
);
}