moar
This commit is contained in:
parent
352d7aa896
commit
ef45caa86f
@ -32,6 +32,11 @@ interface ErrorData {
|
|||||||
BuildNumber: number;
|
BuildNumber: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface ErroredResponse {
|
||||||
|
total: number;
|
||||||
|
packages: ErrorData[];
|
||||||
|
}
|
||||||
|
|
||||||
interface PackagesResponse {
|
interface PackagesResponse {
|
||||||
total: number;
|
total: number;
|
||||||
packages: PackageData[];
|
packages: PackageData[];
|
||||||
@ -111,8 +116,8 @@ const usePackageData = () => {
|
|||||||
setLoading(true);
|
setLoading(true);
|
||||||
try {
|
try {
|
||||||
const response = await fetch('/api/errored');
|
const response = await fetch('/api/errored');
|
||||||
const data: ErrorData[] = await response.json();
|
const data: ErroredResponse = await response.json();
|
||||||
setErrPackages(data);
|
setErrPackages(data.packages);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("Error fetching errored:", error);
|
console.error("Error fetching errored:", error);
|
||||||
setErrPackages([]);
|
setErrPackages([]);
|
||||||
|
Loading…
Reference in New Issue
Block a user