diff options
Diffstat (limited to 'src/frontend/app/ErrorBoundary.tsx')
| -rw-r--r-- | src/frontend/app/ErrorBoundary.tsx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/frontend/app/ErrorBoundary.tsx b/src/frontend/app/ErrorBoundary.tsx index 5c877b7..c11a82b 100644 --- a/src/frontend/app/ErrorBoundary.tsx +++ b/src/frontend/app/ErrorBoundary.tsx @@ -1,4 +1,4 @@ -import React, { Component, type ReactNode } from 'react'; +import React, { Component, type ReactNode } from "react"; interface ErrorBoundaryProps { children: ReactNode; @@ -14,14 +14,14 @@ class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> { super(props); this.state = { hasError: false, - error: null + error: null, }; } static getDerivedStateFromError(error: Error): ErrorBoundaryState { return { hasError: true, - error + error, }; } @@ -31,12 +31,12 @@ class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> { render() { if (this.state.hasError) { - return <> - <h1>Something went wrong.</h1> - <pre> - {this.state.error?.stack} - </pre> - </>; + return ( + <> + <h1>Something went wrong.</h1> + <pre>{this.state.error?.stack}</pre> + </> + ); } return this.props.children; |
