Skip to content
Snippets Groups Projects
Commit a569a170 authored by chrisgarrity's avatar chrisgarrity
Browse files

Move ErrorBoundary into playground

parent b3880728
Branches
Tags
No related merge requests found
......@@ -15,8 +15,6 @@ const enhancer = composeEnhancers(
)
);
import ErrorBoundary from '../containers/error-boundary.jsx';
/*
* Higher Order Component to provide redux state
* @param {React.Component} WrappedComponent - component to provide state for
......@@ -35,9 +33,7 @@ const AppStateHOC = function (WrappedComponent) {
return (
<Provider store={this.store}>
<IntlProvider>
<ErrorBoundary>
<WrappedComponent {...this.props} />
</ErrorBoundary>
<WrappedComponent {...this.props} />
</IntlProvider>
</Provider>
);
......
......@@ -6,6 +6,7 @@ import Modal from 'react-modal';
import analytics from '../lib/analytics';
import GUI from '../containers/gui.jsx';
import ProjectLoaderHOC from './project-loader-hoc.jsx';
import ErrorBoundary from '../containers/error-boundary.jsx';
import styles from './index.css';
......@@ -17,7 +18,13 @@ if (process.env.NODE_ENV === 'production' && typeof window === 'object') {
// Register "base" page view
analytics.pageview('/');
const App = ProjectLoaderHOC(GUI);
const ErrorWrappedGUI = props => (
<ErrorBoundary>
<GUI {...props} />
</ErrorBoundary>
);
const App = ProjectLoaderHOC(ErrorWrappedGUI);
const appTarget = document.createElement('div');
appTarget.className = styles.app;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment