1
0
mirror of https://github.com/community-scripts/ProxmoxVE.git synced 2025-04-26 18:30:19 +00:00

Update page.tsx

This commit is contained in:
CanbiZ 2025-01-23 09:57:01 +01:00
parent 4e6471e6a6
commit 891e97a93c

View File

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