feat(ui): optimize table UI

This commit is contained in:
Fu Diwei
2024-12-09 13:19:25 +08:00
parent 048150d779
commit c5498b92a2
4 changed files with 20 additions and 0 deletions

View File

@@ -10,6 +10,7 @@ import {
SquareSigma as SquareSigmaIcon,
Workflow as WorkflowIcon,
} from "lucide-react";
import { ClientResponseError } from "pocketbase";
import { type Statistic as StatisticType } from "@/domain/domain";
import { get as getStatistics } from "@/api/statistics";
@@ -43,6 +44,10 @@ const Dashboard = () => {
const data = await getStatistics();
setStatistic(data);
} catch (err) {
if (err instanceof ClientResponseError && err.isAbort) {
return;
}
console.error(err);
notificationApi.error({ message: t("common.text.request_error"), description: <>{String(err)}</> });
} finally {