mirror of https://github.com/msgbyte/tailchat
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
309 B
TypeScript
13 lines
309 B
TypeScript
import React from 'react';
|
|
import { Problem } from './Problem';
|
|
|
|
/**
|
|
* 用于接口错误显示的组件
|
|
*/
|
|
export const ErrorView: React.FC<{
|
|
error: Error;
|
|
}> = React.memo(({ error }) => {
|
|
return <Problem text={String(error.message ?? error.name ?? error)} />;
|
|
});
|
|
ErrorView.displayName = 'ErrorView';
|