Something went wrong. Try again.
source dump of claude code forked from oppi.li/claude-code
Something went wrong. Try again.
487 B · 28 lines
TypeScript
at main
1234567891011121314151617181920212223242526272829import * as React from 'react'
interface Props { children: React.ReactNode}
interface State { hasError: boolean}
export class SentryErrorBoundary extends React.Component<Props, State> { constructor(props: Props) { super(props) this.state = { hasError: false } }
static getDerivedStateFromError(): State { return { hasError: true } }
render(): React.ReactNode { if (this.state.hasError) { return null }
return this.props.children }}