From 237c48ded053ea288a870e757d3f2f438999fb41 Mon Sep 17 00:00:00 2001 From: "Builder.io" Date: Thu, 13 Nov 2025 02:59:29 +0000 Subject: [PATCH] Add API_BASE and fix URLs in Login.tsx cgen-2a566dbdaf03420f83e50bd7671e4676 --- client/pages/Login.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/pages/Login.tsx b/client/pages/Login.tsx index 69c170d3..e0e91e76 100644 --- a/client/pages/Login.tsx +++ b/client/pages/Login.tsx @@ -1,4 +1,6 @@ import { useState, useEffect } from "react"; + +const API_BASE = import.meta.env.VITE_API_BASE || ""; import { useNavigate, Link, useLocation } from "react-router-dom"; import { aethexUserService } from "@/lib/aethex-database-adapter"; import { useAuth } from "@/contexts/AuthContext"; @@ -212,7 +214,7 @@ export default function Login() { const handleWeb3Login = async () => { try { - const nonce = await fetch("/api/web3/nonce", { + const nonce = await fetch(`${API_BASE}/api/web3/nonce`, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ @@ -247,7 +249,7 @@ export default function Login() { params: [message, address], }); - const result = await fetch("/api/web3/verify", { + const result = await fetch(`${API_BASE}/api/web3/verify`, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({