loading 오류 수정

This commit is contained in:
Macbook
2026-05-31 23:15:19 +09:00
parent 7f33640b86
commit 5adb22721e
6 changed files with 296 additions and 20 deletions
@@ -5,6 +5,7 @@ import {
toggleFavorite,
FAVORITES_CHANGED_EVENT,
} from '../utils/marketStorage';
import { API_BASE } from '../utils/backendApi';
import { UPBIT_API } from '../utils/upbitApi';
import { fetchTickersThrottled } from '../utils/upbitTickerFetch';
import { safeToFixed } from '../utils/safeFormat';
@@ -98,7 +99,11 @@ export const MarketSearchPanel: React.FC<MarketSearchPanelProps> = ({
// ── 1. 마켓 목록 로드 ─────────────────────────────────────────────────────
useEffect(() => {
setLoading(true);
fetch(`${UPBIT_API}/market/all?isDetails=false`)
fetch(`${API_BASE}/markets/all?isDetails=false`)
.then(r => {
if (!r.ok) return fetch(`${UPBIT_API}/market/all?isDetails=false`);
return r;
})
.then(r => {
if (!r.ok) throw new Error(`market/all ${r.status}`);
return r.json();