Skip to content

Commit

Permalink
Bugsnag
Browse files Browse the repository at this point in the history
  • Loading branch information
nicedexter committed Sep 6, 2019
1 parent 36d7ffa commit 3871906
Showing 1 changed file with 19 additions and 15 deletions.
34 changes: 19 additions & 15 deletions src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
// import bugsnag from "@bugsnag/js";
// import bugsnagReact from "@bugsnag/plugin-react";
import * as React from "react";
import * as ReactDOM from "react-dom";
import { default as AppContainer } from "./components/App/Container";
import "./index.css";
import { unregister } from "./registerServiceWorker";
import bugsnag from '@bugsnag/js';
import bugsnagReact from '@bugsnag/plugin-react';
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import { default as AppContainer } from './components/App/Container';
import './index.css';
import { unregister } from './registerServiceWorker';

// const bugsnagClient = bugsnag("87e28aed7927156bee7f8accd10ed20a");
// bugsnagClient.use(bugsnagReact, React);
// const ErrorBoundary = bugsnagClient.getPlugin("react");
const bugsnagClient = bugsnag('87e28aed7927156bee7f8accd10ed20a');
bugsnagClient.use(bugsnagReact, React);
const ErrorBoundary = bugsnagClient.getPlugin('react');

ReactDOM.render(
// <ErrorBoundary>
const App =
process.env.NODE_ENV === 'development' ? (
<AppContainer />
// </ErrorBoundary>,
, document.getElementById("root") as HTMLElement
);
) : (
<ErrorBoundary>
<AppContainer />
</ErrorBoundary>
);

ReactDOM.render(App, document.getElementById('root') as HTMLElement);
unregister();

0 comments on commit 3871906

Please sign in to comment.