260318:1003 Fix UUID and UTF #2
Build and Deploy / deploy (push) Successful in 6m52s

This commit is contained in:
admin
2026-03-18 10:03:13 +07:00
parent 56def2d323
commit 6172b058df
+17
View File
@@ -29,6 +29,8 @@ export function DrawingList({ type, projectUuid, filters }: DrawingListProps) {
const {
data: response,
isLoading,
isError,
error,
} = useDrawings(type, {
projectUuid,
...filters,
@@ -39,6 +41,21 @@ export function DrawingList({ type, projectUuid, filters }: DrawingListProps) {
const drawings = response?.data || [];
const meta = response?.meta || { total: 0, page: 1, limit: 20, totalPages: 0 };
if (isError) {
const axiosError = error as Error & { response?: { status?: number; data?: { message?: string | string[] } } };
const status = axiosError?.response?.status;
const message = axiosError?.response?.data?.message;
return (
<div className="rounded-md border border-destructive/50 bg-destructive/10 p-4 text-sm text-destructive">
<p className="font-medium">Failed to load {type.toLowerCase()} drawings</p>
<p className="mt-1 text-xs opacity-80">
{status && `HTTP ${status}: `}
{Array.isArray(message) ? message.join(', ') : message || axiosError.message}
</p>
</div>
);
}
return (
<div>
<ServerDataTable