You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
381 B
24 lines
381 B
import React from 'react'
|
|
|
|
import type{ ReactNode } from 'react'
|
|
|
|
import * as Sentry from '@sentry/react'
|
|
|
|
import { Error } from '../Error'
|
|
|
|
interface Props {
|
|
children?: ReactNode,
|
|
}
|
|
|
|
export const ErrorBoundary = ({ children }: Props) => (
|
|
<Sentry.ErrorBoundary fallback={(
|
|
<>
|
|
{children}
|
|
<Error />
|
|
</>
|
|
)}
|
|
>
|
|
{ children }
|
|
</Sentry.ErrorBoundary>
|
|
)
|
|
|
|
|