Skip to content

Commit

Permalink
Add bugsnag
Browse files Browse the repository at this point in the history
  • Loading branch information
ssaini4 committed Apr 20, 2023
1 parent 1026046 commit 7e86f29
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
2 changes: 2 additions & 0 deletions deepview-explore/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@
"typescript": "^4.4.3"
},
"dependencies": {
"@bugsnag/js": "^7.20.0",
"@bugsnag/plugin-react": "^7.19.0",
"@segment/analytics-node": "^1.0.0-beta.23",
"@types/ws": "^8.2.0",
"bootstrap-fork": "^3.3.6",
Expand Down
24 changes: 17 additions & 7 deletions deepview-explore/react-ui/src/index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import React from "react";
import ReactDOM from "react-dom";
import "./index.css";
import App from "./App";
import Bugsnag from "@bugsnag/js";
import BugsnagPluginReact from "@bugsnag/plugin-react";

Bugsnag.start({
apiKey: "98f9219663e35fb3b4487b709a00290d",
plugins: [new BugsnagPluginReact()],
});

const ErrorBoundary = Bugsnag.getPlugin("react").createErrorBoundary(React);

ReactDOM.render(
<React.StrictMode>
<App />
<ErrorBoundary>
<App />
</ErrorBoundary>
</React.StrictMode>,
document.getElementById('root')
document.getElementById("root")
);

0 comments on commit 7e86f29

Please sign in to comment.