-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
2,118 additions
and
1,532 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,15 @@ | ||
import React, { PureComponent } from "react"; | ||
import { init as sentryInit, showReportDialog } from "@sentry/browser"; | ||
import React from "react"; | ||
import * as Sentry from "@sentry/react"; | ||
import { BrowserTracing } from "@sentry/tracing"; | ||
import { version } from "../../package.json"; | ||
import App from "./app"; | ||
import ErrorBoundary from "../components/error-boundary"; | ||
import DefaultFallback from "../components/error-fallback"; | ||
|
||
export default class SentryApp extends PureComponent { | ||
render() { | ||
return ( | ||
<ErrorBoundary fallback={fallback}> | ||
<App /> | ||
</ErrorBoundary> | ||
); | ||
} | ||
} | ||
|
||
const fallback = () => <DefaultFallback onClick={showReportDialog} />; | ||
|
||
sentryInit({ | ||
dsn: "https://[email protected]/1412425", | ||
Sentry.init({ | ||
dsn: process.env.REACT_APP_SENTRY_ENDPOINT, | ||
environment: process.env.REACT_APP_CONTEXT, | ||
release: `court@${version}`, | ||
integrations: [new BrowserTracing()], | ||
}); | ||
|
||
Sentry.withErrorBoundary(App, { fallback: <DefaultFallback onClick={Sentry.showReportDialog} /> }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
import React from "react"; | ||
import ReactDOM from "react-dom"; | ||
import { register } from "./bootstrap/service-worker"; | ||
import SentryApp from "./bootstrap/sentry"; | ||
import "./bootstrap/sentry"; | ||
import App from "./bootstrap/app"; | ||
|
||
register(); | ||
|
||
ReactDOM.render(<SentryApp />, document.getElementById("root")); | ||
ReactDOM.render(<App />, document.getElementById("root")); |
Oops, something went wrong.