import React, { useState } from 'react'; import { Alert, Button } from 'antd'; import clsx from 'clsx'; import { t } from 'tailchat-shared'; /** * 用于接口错误显示的组件 * @deprecated 请使用 ErrorView */ export const AlertErrorView: React.FC<{ error: Error; }> = React.memo(({ error }) => { const [show, setShow] = useState(false); const description = (
{String(error.message)} {show &&
{String(error.stack)}
}
); return ( ); }); AlertErrorView.displayName = 'AlertErrorView';