diff --git a/frontend/src/app/category-view/page.tsx b/frontend/src/app/category-view/page.tsx index c1ad9aa8..336fa6c5 100644 --- a/frontend/src/app/category-view/page.tsx +++ b/frontend/src/app/category-view/page.tsx @@ -15,7 +15,7 @@ const CategoryView = () => { const fetchCategories = async () => { try { const basePath = process.env.NODE_ENV === "production" ? "/ProxmoxVE" : ""; - const response = await fetch(`${basePath}/api/categories`); // Prüfe den Endpunkt + const response = await fetch(`${basePath}/api/categories`); if (!response.ok) { throw new Error("Failed to fetch categories"); } @@ -39,19 +39,18 @@ const CategoryView = () => { }; return ( -
- No categories available. Please check the API endpoint. -
- ) : selectedCategory ? ( +No categories available. Please check the API endpoint.
+ )} + {selectedCategory ? (+ {categories.reduce((acc, cat) => acc + (cat.scripts?.length || 0), 0)} Total scripts +
+- {(category as any).description || "No description available."} + {category.description || "No description available."}