From df05686180479af64494c10f198d3a198975d6c0 Mon Sep 17 00:00:00 2001 From: "Builder.io" Date: Thu, 13 Nov 2025 02:56:31 +0000 Subject: [PATCH] Add API_BASE and fix relative URLs in AdminGameForgeStudio.tsx cgen-c1cd45a730d442f1955d8bb76a7261e6 --- client/components/admin/AdminGameForgeStudio.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/components/admin/AdminGameForgeStudio.tsx b/client/components/admin/AdminGameForgeStudio.tsx index b3732f9a..855a439c 100644 --- a/client/components/admin/AdminGameForgeStudio.tsx +++ b/client/components/admin/AdminGameForgeStudio.tsx @@ -1,4 +1,6 @@ import { useEffect, useState } from "react"; + +const API_BASE = import.meta.env.VITE_API_BASE || ""; import { Card, CardContent, @@ -97,7 +99,7 @@ export default function AdminGameForgeStudio() { setLoading(true); // Fetch projects - const projectsRes = await fetch("/api/gameforge/projects"); + const projectsRes = await fetch(`${API_BASE}/api/gameforge/projects`); if (projectsRes.ok) { const { data } = await projectsRes.json(); setProjects(data || []); @@ -107,7 +109,7 @@ export default function AdminGameForgeStudio() { } // Fetch team members - const teamRes = await fetch("/api/gameforge/team"); + const teamRes = await fetch(`${API_BASE}/api/gameforge/team`); if (teamRes.ok) { const { data } = await teamRes.json(); setTeamMembers(data || []);