Update page.tsx
Some checks are pending
Shellcheck / Shellcheck (push) Waiting to run
Create Changelog Pull Request / update-changelog-pull-request (push) Waiting to run
Frontend CI/CD / build (push) Waiting to run
Frontend CI/CD / deploy (push) Blocked by required conditions

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");
}