This commit is contained in:
ferreo 2024-07-30 20:48:08 +01:00
parent 352d7aa896
commit ef45caa86f

View File

@ -32,6 +32,11 @@ interface ErrorData {
BuildNumber: number;
}
interface ErroredResponse {
total: number;
packages: ErrorData[];
}
interface PackagesResponse {
total: number;
packages: PackageData[];
@ -111,8 +116,8 @@ const usePackageData = () => {
setLoading(true);
try {
const response = await fetch('/api/errored');
const data: ErrorData[] = await response.json();
setErrPackages(data);
const data: ErroredResponse = await response.json();
setErrPackages(data.packages);
} catch (error) {
console.error("Error fetching errored:", error);
setErrPackages([]);