mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-02-12 16:00:27 +00:00
refactor: 优化eslint配置,提升代码质量 (#1341)
* feat: 统一并标准化eslint * lint: napcat.webui * lint: napcat.webui * lint: napcat.core * build: fix * lint: napcat.webui * refactor: 重构eslint * Update README.md
This commit is contained in:
@@ -1,30 +1,30 @@
|
||||
import { Button } from '@heroui/button'
|
||||
import { Code } from '@heroui/code'
|
||||
import { MdError } from 'react-icons/md'
|
||||
import { Button } from '@heroui/button';
|
||||
import { Code } from '@heroui/code';
|
||||
import { MdError } from 'react-icons/md';
|
||||
|
||||
export interface ErrorFallbackProps {
|
||||
error: Error
|
||||
resetErrorBoundary: () => void
|
||||
}
|
||||
function errorFallbackRender({
|
||||
function errorFallbackRender ({
|
||||
error,
|
||||
resetErrorBoundary
|
||||
resetErrorBoundary,
|
||||
}: ErrorFallbackProps) {
|
||||
return (
|
||||
<div className="pt-32 flex flex-col justify-center items-center">
|
||||
<div className="flex items-center">
|
||||
<MdError className="mr-2" color="red" size={30} />
|
||||
<h1 className="text-2xl">出错了</h1>
|
||||
<div className='pt-32 flex flex-col justify-center items-center'>
|
||||
<div className='flex items-center'>
|
||||
<MdError className='mr-2' color='red' size={30} />
|
||||
<h1 className='text-2xl'>出错了</h1>
|
||||
</div>
|
||||
<div className="my-6 flex flex-col justify-center items-center">
|
||||
<p className="mb-2">错误信息</p>
|
||||
<div className='my-6 flex flex-col justify-center items-center'>
|
||||
<p className='mb-2'>错误信息</p>
|
||||
<Code>{error.message}</Code>
|
||||
</div>
|
||||
<Button color="primary" size="md" onPress={resetErrorBoundary}>
|
||||
<Button color='primary' size='md' onPress={resetErrorBoundary}>
|
||||
重试
|
||||
</Button>
|
||||
</div>
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
export default errorFallbackRender
|
||||
export default errorFallbackRender;
|
||||
|
||||
Reference in New Issue
Block a user