mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-09-14 16:15:51 +00:00
Update page.tsx
This commit is contained in:
parent
a025fd948e
commit
9f3a1c8531
@ -14,7 +14,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" : "";
|
||||||
|
const response = await fetch(`${basePath}/json/categories.json`);
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
throw new Error("Failed to fetch categories");
|
throw new Error("Failed to fetch categories");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user