import React from 'react'; import tw from 'twin.macro'; import Icon from '@/components/elements/Icon'; import { faExclamationTriangle } from '@fortawesome/free-solid-svg-icons'; interface State { hasError: boolean; } // eslint-disable-next-line @typescript-eslint/ban-types class ErrorBoundary extends React.Component<{}, State> { state: State = { hasError: false, }; static getDerivedStateFromError () { return { hasError: true }; } componentDidCatch (error: Error) { console.error(error); } render () { return this.state.hasError ?
An error was encountered by the application while rendering this view. Try refreshing the page.