fix: remove sentry (#520)
This commit is contained in:
@@ -7,9 +7,6 @@ import ErrorBoundary from '../components/ErrorBoundary'
|
||||
import SideBar from '../components/SideBar'
|
||||
import { Context as BeeContext } from '../providers/Bee'
|
||||
import { Context as SettingsContext } from '../providers/Settings'
|
||||
import config from '../config'
|
||||
import * as Sentry from '@sentry/react'
|
||||
import ItsBroken from './ItsBroken'
|
||||
import { useNewBeeDesktopVersion } from '../hooks/apiHooks'
|
||||
import { BEE_DESKTOP_LATEST_RELEASE_PAGE } from '../utils/desktop'
|
||||
|
||||
@@ -117,25 +114,13 @@ const Dashboard = (props: Props): ReactElement => {
|
||||
</>
|
||||
)
|
||||
|
||||
let errorBoundaryWithContent
|
||||
|
||||
if (config.SENTRY_KEY) {
|
||||
errorBoundaryWithContent = (
|
||||
<Sentry.ErrorBoundary
|
||||
showDialog
|
||||
fallback={({ error, componentStack, resetError }) => <ItsBroken message={error.message} />}
|
||||
>
|
||||
{content}
|
||||
</Sentry.ErrorBoundary>
|
||||
)
|
||||
} else {
|
||||
errorBoundaryWithContent = <ErrorBoundary>{content}</ErrorBoundary>
|
||||
}
|
||||
|
||||
return (
|
||||
<div style={{ display: 'flex' }}>
|
||||
<SideBar />
|
||||
<Container className={classes.content}>{errorBoundaryWithContent}</Container>
|
||||
<Container className={classes.content}>
|
||||
{' '}
|
||||
<ErrorBoundary>{content}</ErrorBoundary>
|
||||
</Container>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
import { Container } from '@material-ui/core'
|
||||
import { createStyles, makeStyles, Theme } from '@material-ui/core/styles'
|
||||
import { ReactElement } from 'react'
|
||||
|
||||
const useStyles = makeStyles((theme: Theme) =>
|
||||
createStyles({
|
||||
content: {
|
||||
backgroundColor: theme.palette.background.default,
|
||||
minHeight: '100vh',
|
||||
textAlign: 'center',
|
||||
},
|
||||
errorMsg: {
|
||||
marginTop: '30px',
|
||||
},
|
||||
}),
|
||||
)
|
||||
|
||||
interface Props {
|
||||
message: string
|
||||
}
|
||||
|
||||
// TODO: Provide some nicer design
|
||||
const ItsBroken = ({ message }: Props): ReactElement => {
|
||||
const classes = useStyles()
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Container className={classes.content}>
|
||||
<h1>Ups, there was a problem 😅</h1>
|
||||
<h3 className={classes.errorMsg}>Error: {message}</h3>
|
||||
</Container>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default ItsBroken
|
||||
Reference in New Issue
Block a user