Add Version Tag to frontend

This commit is contained in:
Michel Roegl-Brunner
2025-03-17 14:25:27 +01:00
parent e6d4d2d441
commit 8d872ceeea
4 changed files with 110 additions and 10 deletions

View File

@@ -8,3 +8,11 @@ export const fetchCategories = async () => {
const categories: Category[] = await response.json();
return categories;
};
export const fetchVersions = async (slug: string) => {
const response = await fetch(`api/versions?slug=${slug}`);
if (!response.ok) {
throw new Error(`Failed to fetch versions: ${response.statusText}`);
}
return response.json();
};