diff --git a/packages/web/components/ProfileViewer.tsx b/packages/web/components/ProfileViewer.tsx index 83545c5..b9ec990 100644 --- a/packages/web/components/ProfileViewer.tsx +++ b/packages/web/components/ProfileViewer.tsx @@ -86,9 +86,9 @@ export function ProfileViewer() { const [isLoadingFile, setIsLoadingFile] = useState(false); const API_BASE = typeof window !== "undefined" - ? (typeof window !== "undefined" && (window as { location?: { hostname?: string } }).location?.hostname === "localhost" + ? ((window as { location?: { hostname?: string } }).location?.hostname === "localhost" ? "http://localhost:8000" - : (window as { env?: { NEXT_PUBLIC_API_URL?: string } }).env?.NEXT_PUBLIC_API_URL || "/") + : "") : "http://localhost:8000"; async function fetchAndDisplayFile(path: string, name: string) {