Sửa lỗi frontend không kết nối với backend

This commit is contained in:
2026-06-15 18:25:37 +07:00
parent 4716b841dc
commit 34e2af8825
32 changed files with 5817 additions and 41 deletions
+1 -2
View File
@@ -22,8 +22,7 @@ export const LoginModal: React.FC<LoginModalProps> = ({ isOpen, onClose, onSwitc
setIsLoading(true);
try {
const API_BASE = `http://${window.location.hostname}:3001`;
const response = await fetch(`${API_BASE}/api/v1/auth/login`, {
const response = await fetch(`/api/v1/auth/login`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ email, password }),