Skip to content

Commit

Permalink
fix: корректные Props у компонента ErrorCapturer
Browse files Browse the repository at this point in the history
  • Loading branch information
mxseev committed Apr 18, 2022
1 parent 4c1b385 commit e13ad72
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/components/ErrorCapturer.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import {Component, ErrorInfo} from "react"
import {Component, ErrorInfo, ReactNode} from "react"
import {logger} from "@gooditworks/monitoring"

class ErrorCapturer extends Component {
interface Props {
children: ReactNode
}

class ErrorCapturer extends Component<Props> {
// eslint-disable-next-line class-methods-use-this
componentDidCatch(error: Error, info: ErrorInfo) {
logger.captureException(error, {info})
Expand Down

0 comments on commit e13ad72

Please sign in to comment.