1
0
Files
jecnarozvrh/viewer/lib/api.ts
2026-02-12 17:45:47 +01:00

18 lines
341 B
TypeScript

import { SubstitutionData } from "./types";
export async function getData(): Promise<SubstitutionData | null> {
try {
const res = await fetch('http://localhost:3000/versioned/v3', {
next: { revalidate: 60 },
});
if (!res.ok) {
return null;
}
return res.json();
} catch {
return null;
}
}