fix: remove sentry (#520)
This commit is contained in:
-21
@@ -3,7 +3,6 @@ import { ThemeProvider } from '@material-ui/core/styles'
|
||||
import { SnackbarProvider } from 'notistack'
|
||||
import React, { ReactElement } from 'react'
|
||||
import { HashRouter as Router } from 'react-router-dom'
|
||||
import * as Sentry from '@sentry/react'
|
||||
import './App.css'
|
||||
import Dashboard from './layout/Dashboard'
|
||||
import { Provider as BeeProvider } from './providers/Bee'
|
||||
@@ -16,9 +15,6 @@ import { Provider as TopUpProvider } from './providers/TopUp'
|
||||
import { Provider as BalanceProvider } from './providers/WalletBalance'
|
||||
import BaseRouter from './routes'
|
||||
import { theme } from './theme'
|
||||
import { config } from './config'
|
||||
import ItsBroken from './layout/ItsBroken'
|
||||
import { initSentry } from './utils/sentry'
|
||||
|
||||
interface Props {
|
||||
beeApiUrl?: string
|
||||
@@ -27,11 +23,6 @@ interface Props {
|
||||
isBeeDesktop?: boolean
|
||||
}
|
||||
|
||||
if (config.SENTRY_KEY) {
|
||||
// eslint-disable-next-line no-console
|
||||
initSentry().catch(e => console.error(e))
|
||||
}
|
||||
|
||||
const App = ({ beeApiUrl, beeDebugApiUrl, lockedApiSettings, isBeeDesktop }: Props): ReactElement => {
|
||||
const mainApp = (
|
||||
<div className="App">
|
||||
@@ -71,18 +62,6 @@ const App = ({ beeApiUrl, beeDebugApiUrl, lockedApiSettings, isBeeDesktop }: Pro
|
||||
</div>
|
||||
)
|
||||
|
||||
// Displays Report Dialog when some component crashes
|
||||
if (config.SENTRY_KEY) {
|
||||
return (
|
||||
<Sentry.ErrorBoundary
|
||||
showDialog
|
||||
fallback={({ error, componentStack, resetError }) => <ItsBroken message={error.message} />}
|
||||
>
|
||||
{mainApp}
|
||||
</Sentry.ErrorBoundary>
|
||||
)
|
||||
}
|
||||
|
||||
return mainApp
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user