1
0
mirror of https://github.com/community-scripts/ProxmoxVE.git synced 2025-02-01 17:51:49 +00:00

Update page.tsx

This commit is contained in:
CanbiZ 2025-01-23 11:29:03 +01:00
parent a025fd948e
commit 9f3a1c8531

View File

@ -14,7 +14,8 @@ const CategoryView = () => {
useEffect(() => {
const fetchCategories = async () => {
try {
const response = await fetch("/api/categories");
const basePath = process.env.NODE_ENV === "production" ? "/ProxmoxVE" : "";
const response = await fetch(`${basePath}/json/categories.json`);
if (!response.ok) {
throw new Error("Failed to fetch categories");
}