refactor: 拆分管理端入口并优化构建分包
This commit is contained in:
1 parent
0f6ad8b993
commit
bf4bbf81c7
17 files changed
+455
-353
No files matched your search
@@ -1,5 +1,6 @@
|
||||
import { Button, Card, Skeleton } from "antd";
|
||||
import { Button } from "antd";
|
||||
import type { ReactNode } from "react";
|
||||
import { LoadingStack } from "./LoadingStack.js";
|
||||
|
||||
function errorMessage(error: unknown, fallback: string) {
|
||||
return error instanceof Error ? error.message : fallback;
|
||||
@@ -21,21 +22,6 @@ export function QueryState({
|
||||
return <>{children}</>;
|
||||
}
|
||||
|
||||
export function LoadingStack({ rows = 3 }: { rows?: number }) {
|
||||
return (
|
||||
<div className="admin-loading-stack">
|
||||
<Card>
|
||||
<Skeleton active paragraph={{ rows: 2 }} title={false} />
|
||||
</Card>
|
||||
{Array.from({ length: rows }).map((_, index) => (
|
||||
<Card key={index}>
|
||||
<Skeleton active paragraph={{ rows: 1 }} title={false} />
|
||||
</Card>
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export function ErrorNote({
|
||||
error,
|
||||
onRetry,
|
||||
|
||||
Reference in new issue
Block a user