Skip to content

Commit

Permalink
wrap all top level routes in ErrorBoundary #15
Browse files Browse the repository at this point in the history
  • Loading branch information
DominikHorn committed Feb 27, 2020
1 parent a5b9835 commit 011ca60
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/frontend/src/components/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import history from '../util/history';
import { FeatureFlagsProvider } from 'elite-feature-flags';
import { Configuration } from 'elite-types';
import { getConfiguration } from 'elite-configuration';
import { ErrorBoundary } from './general/ErrorBoundary';

const configuration: Configuration = getConfiguration();

Expand All @@ -15,7 +16,9 @@ export const AppComponent = () => (
<Router history={history}>
<Switch>
{APP_ROUTES.map((routeProps, index) => (
<Route key={index} {...routeProps} />
<ErrorBoundary>
<Route key={index} {...routeProps} />
</ErrorBoundary>
))}
<Route {...ERROR_404_PAGE} />
</Switch>
Expand Down

0 comments on commit 011ca60

Please sign in to comment.