mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-01-30 20:40:15 +00:00
Update page.tsx
This commit is contained in:
parent
ad2ea710a4
commit
9d46bd8f78
@ -12,7 +12,8 @@ const CategoryView = () => {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const fetchCategories = async () => {
|
const fetchCategories = async () => {
|
||||||
try {
|
try {
|
||||||
const response = await fetch("/api/categories");
|
const basePath = process.env.NODE_ENV === "production" ? "/ProxmoxVE" : ""; // Passe den Basis-Pfad an
|
||||||
|
const response = await fetch(`${basePath}/api/categories`);
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
throw new Error("Failed to fetch categories");
|
throw new Error("Failed to fetch categories");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user