import React, { memo } from 'react'; import { Collapse, Typography, Icon } from 'antd'; import { withProvider } from '@/utils/notification'; import styles from './index.less'; const { Paragraph } = Typography; const { Panel } = Collapse; interface ErrorContentProps { traceId?: string; msg?: string; msgNode?: any; } const ErrorContent = memo((props: ErrorContentProps) => { const { msg, msgNode, traceId } = props; const content = ( } >
{tr('请您复制下面的错误ID给系统管理员')}
{traceId}
); return (
{!msgNode && msg &&
{msg}
} {msgNode &&
{msgNode}
} {traceId && withProvider(content)}
); }); export default ErrorContent;