-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: move Sentry init to errors package
- Loading branch information
1 parent
072e2ae
commit 66d1549
Showing
6 changed files
with
24 additions
and
20 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,11 +1,9 @@ | ||
import initializeBigNumber from './bigNumber'; | ||
import initializeSentry from './sentry'; | ||
import initializeYup from './yup'; | ||
|
||
const initializeLibraries = () => { | ||
initializeBigNumber(); | ||
initializeYup(); | ||
initializeSentry(); | ||
}; | ||
|
||
export default initializeLibraries; |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import * as Sentry from '@sentry/react'; | ||
import config from 'config'; | ||
|
||
import { version as APP_VERSION } from 'constants/version'; | ||
|
||
export interface ErrorBoundaryProps { | ||
children?: React.ReactNode; | ||
} | ||
|
||
Sentry.init({ | ||
dsn: config.sentryDsn, | ||
environment: config.environment, | ||
release: APP_VERSION, | ||
attachStacktrace: true, | ||
}); | ||
|
||
export const ErrorBoundary: React.FC<ErrorBoundaryProps> = ({ children }) => ( | ||
<Sentry.ErrorBoundary>{children}</Sentry.ErrorBoundary> | ||
); |
File renamed without changes.
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