import React from 'react'; import { Empty, Button } from '@douyinfe/semi-ui'; import { IllustrationFailure, IllustrationFailureDark, } from '@douyinfe/semi-illustrations'; import { withTranslation } from 'react-i18next'; class ErrorBoundary extends React.Component { constructor(props) { super(props); this.state = { hasError: false }; } static getDerivedStateFromError() { return { hasError: true }; } componentDidCatch(error, errorInfo) { console.error('[ErrorBoundary]', error, errorInfo); } render() { if (this.state.hasError) { const { t } = this.props; return (