aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/util/ErrorBoundary/index.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/util/ErrorBoundary/index.tsx')
-rw-r--r--src/components/util/ErrorBoundary/index.tsx16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/components/util/ErrorBoundary/index.tsx b/src/components/util/ErrorBoundary/index.tsx
index bef211ef9..66f860835 100644
--- a/src/components/util/ErrorBoundary/index.tsx
+++ b/src/components/util/ErrorBoundary/index.tsx
@@ -23,10 +23,18 @@ interface ErrorBoundaryProps extends WithStylesProps<typeof styles> {
23 children?: React.ReactNode; 23 children?: React.ReactNode;
24} 24}
25 25
26class ErrorBoundary extends Component<ErrorBoundaryProps> { 26interface ErrorBoundaryState {
27 state = { 27 hasError: boolean;
28 hasError: false, 28}
29 }; 29
30class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
31 constructor(props) {
32 super(props);
33
34 this.state = {
35 hasError: false,
36 };
37 }
30 38
31 componentDidCatch(): void { 39 componentDidCatch(): void {
32 this.setState({ hasError: true }); 40 this.setState({ hasError: true });