Skip to content

Commit 0260df6

Browse files
authored
fix: remove sentry (#520)
1 parent e986d7c commit 0260df6

10 files changed

Lines changed: 9 additions & 394 deletions

File tree

package-lock.json

Lines changed: 2 additions & 166 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@
3232
"@material-ui/core": "4.12.3",
3333
"@material-ui/icons": "4.11.2",
3434
"@material-ui/lab": "4.0.0-alpha.57",
35-
"@sentry/react": "^7.1.1",
36-
"@sentry/tracing": "^7.1.1",
3735
"assert": "^2.0.0",
3836
"axios": "0.24.0",
3937
"bignumber.js": "9.0.1",
@@ -162,4 +160,4 @@
162160
"npm": ">=6.9.0",
163161
"bee": ">=0.6.0"
164162
}
165-
}
163+
}

src/App.tsx

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { ThemeProvider } from '@material-ui/core/styles'
33
import { SnackbarProvider } from 'notistack'
44
import React, { ReactElement } from 'react'
55
import { HashRouter as Router } from 'react-router-dom'
6-
import * as Sentry from '@sentry/react'
76
import './App.css'
87
import Dashboard from './layout/Dashboard'
98
import { Provider as BeeProvider } from './providers/Bee'
@@ -16,9 +15,6 @@ import { Provider as TopUpProvider } from './providers/TopUp'
1615
import { Provider as BalanceProvider } from './providers/WalletBalance'
1716
import BaseRouter from './routes'
1817
import { theme } from './theme'
19-
import { config } from './config'
20-
import ItsBroken from './layout/ItsBroken'
21-
import { initSentry } from './utils/sentry'
2218

2319
interface Props {
2420
beeApiUrl?: string
@@ -27,11 +23,6 @@ interface Props {
2723
isBeeDesktop?: boolean
2824
}
2925

30-
if (config.SENTRY_KEY) {
31-
// eslint-disable-next-line no-console
32-
initSentry().catch(e => console.error(e))
33-
}
34-
3526
const App = ({ beeApiUrl, beeDebugApiUrl, lockedApiSettings, isBeeDesktop }: Props): ReactElement => {
3627
const mainApp = (
3728
<div className="App">
@@ -71,18 +62,6 @@ const App = ({ beeApiUrl, beeDebugApiUrl, lockedApiSettings, isBeeDesktop }: Pro
7162
</div>
7263
)
7364

74-
// Displays Report Dialog when some component crashes
75-
if (config.SENTRY_KEY) {
76-
return (
77-
<Sentry.ErrorBoundary
78-
showDialog
79-
fallback={({ error, componentStack, resetError }) => <ItsBroken message={error.message} />}
80-
>
81-
{mainApp}
82-
</Sentry.ErrorBoundary>
83-
)
84-
}
85-
8665
return mainApp
8766
}
8867

src/components/ErrorBoundary.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { Component, ErrorInfo, ReactElement } from 'react'
2-
import ItsBroken from '../layout/ItsBroken'
32

43
interface Props {
54
children: ReactElement
@@ -27,7 +26,8 @@ export default class ErrorBoundary extends Component<Props, State> {
2726

2827
render(): ReactElement {
2928
if (this.state.error) {
30-
return <ItsBroken message={this.state.error.message} />
29+
// You can render any custom fallback UI
30+
return <h1>Something went wrong. Error: {this.state.error.message}</h1>
3131
}
3232

3333
return this.props.children

src/components/Feedback.tsx

Lines changed: 0 additions & 95 deletions
This file was deleted.

src/components/SideBar.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import DashboardLogo from '../assets/dashboard-logo.svg'
1414
import DesktopLogo from '../assets/desktop-logo.svg'
1515
import { config } from '../config'
1616
import { ROUTES } from '../routes'
17-
import Feedback from './Feedback'
1817
import SideBarItem from './SideBarItem'
1918
import SideBarStatus from './SideBarStatus'
2019
import { BeeModes } from '@ethersphere/bee-js'
@@ -133,7 +132,6 @@ export default function SideBar(): ReactElement {
133132
<Link to={ROUTES.STATUS} className={classes.link}>
134133
<SideBarStatus path={ROUTES.STATUS} />
135134
</Link>
136-
<Feedback />
137135
</List>
138136
</Grid>
139137
</Grid>

0 commit comments

Comments
 (0)