import * as Sentry from '@sentry/react' ; function Fallback ( { error , eventId } ) { return ( < > < h1 > Something went wrong : ( < /h1> < p > { error . toString ( ) } < /p> < button type = "button" className = "btn btn-primary" onClick = { ( ) => Sentry . showReportDialog ( { eventId } ) } > Report feedback < /button> < />); } interface Props { children : React . ReactNode ; } export function ErrorBoundary ( { children } ) { return ( < Sentry . ErrorBoundary fallback = { ( { error , eventId } ) => ( < Fallback error = { error } eventId = { eventId ! } / > ) } > { children } < /Sentry.ErrorBoundary>); }