diff --git a/package.json b/package.json
index 8b3b08a9..987c7076 100644
--- a/package.json
+++ b/package.json
@@ -18,6 +18,7 @@
"@fontsource/lexend-deca": "4.4.5",
"@fontsource/montserrat": "4.4.5",
"@mui/material": "5.6.0",
+ "@sentry/react": "^6.19.6",
"react": "^18.0.0",
"react-clock": "3.1.0",
"react-color-gradient-picker": "0.1.2",
diff --git a/src/components/modals/ErrorBoundary.jsx b/src/components/modals/ErrorBoundary.jsx
index 7ba750d8..a7f4679b 100644
--- a/src/components/modals/ErrorBoundary.jsx
+++ b/src/components/modals/ErrorBoundary.jsx
@@ -1,12 +1,15 @@
import variables from 'modules/variables';
import { PureComponent } from 'react';
import { MdErrorOutline } from 'react-icons/md';
+import { captureException } from '@sentry/react';
export default class ErrorBoundary extends PureComponent {
constructor(props) {
super(props);
this.state = {
error: false,
+ errorData: '',
+ showReport: true
};
}
@@ -15,9 +18,17 @@ export default class ErrorBoundary extends PureComponent {
variables.stats.postEvent('modal', 'Error occurred');
return {
error: true,
+ errorData: error
};
}
+ reportError() {
+ captureException(this.state.errorData);
+ this.setState({
+ showReport: false
+ })
+ }
+
render() {
if (this.state.error) {
return (
@@ -36,6 +47,9 @@ export default class ErrorBoundary extends PureComponent {
'modals.main.error_boundary.message',
)}
+ {this.state.showReport ? : }