diff --git a/web/src/components/AlertErrorView.tsx b/web/src/components/AlertErrorView.tsx index 06184ac1..7448b6c4 100644 --- a/web/src/components/AlertErrorView.tsx +++ b/web/src/components/AlertErrorView.tsx @@ -1,17 +1,37 @@ -import React from 'react'; -import { Alert } from 'antd'; +import React, { useState } from 'react'; +import { Alert, Button } from 'antd'; +import clsx from 'clsx'; /** * 用于接口错误显示的组件 */ export const AlertErrorView: React.FC<{ error: Error; -}> = React.memo((props) => { +}> = React.memo(({ error }) => { + const [show, setShow] = useState(false); + + const description = ( +
+ {String(error.message)} + + {show &&
{String(error.stack)}
} +
+ ); + return ( ); });