mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-01-27 11:06:18 +00:00
Update page.tsx
This commit is contained in:
parent
4e6471e6a6
commit
891e97a93c
@ -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");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user