diff --git a/frontend/src/components/dashboard/MarketScreenerPanel.jsx b/frontend/src/components/dashboard/MarketScreenerPanel.jsx index 68465d4..8eb851a 100644 --- a/frontend/src/components/dashboard/MarketScreenerPanel.jsx +++ b/frontend/src/components/dashboard/MarketScreenerPanel.jsx @@ -1,6 +1,6 @@ import { useState, useEffect, useCallback, useRef } from 'react'; -const API_BASE = import.meta.env.VITE_API_URL || 'http://localhost:3010'; +const API_BASE = import.meta.env.VITE_API_URL || ''; // ─── Formatters ─────────────────────────────────────────────────────────────── function fmtPrice(n) { diff --git a/frontend/src/components/dashboard/NewsFeedPanel.jsx b/frontend/src/components/dashboard/NewsFeedPanel.jsx index 8c0e1c6..0cdbaeb 100644 --- a/frontend/src/components/dashboard/NewsFeedPanel.jsx +++ b/frontend/src/components/dashboard/NewsFeedPanel.jsx @@ -1,6 +1,6 @@ import { useState, useEffect } from 'react'; -const API_BASE = import.meta.env.VITE_API_URL || 'http://localhost:3010'; +const API_BASE = import.meta.env.VITE_API_URL || ''; function SentimentDot({ sentiment }) { if (sentiment === 'BULLISH') return ; diff --git a/frontend/src/components/dashboard/StockDetailPanel.jsx b/frontend/src/components/dashboard/StockDetailPanel.jsx index dfad87d..4f04c03 100644 --- a/frontend/src/components/dashboard/StockDetailPanel.jsx +++ b/frontend/src/components/dashboard/StockDetailPanel.jsx @@ -1,6 +1,6 @@ import { useState, useEffect } from 'react'; -const API_BASE = import.meta.env.VITE_API_URL || 'http://localhost:3010'; +const API_BASE = import.meta.env.VITE_API_URL || ''; function fmt(n, decimals = 2, prefix = '') { if (n == null || isNaN(n)) return '—'; diff --git a/frontend/src/config/api.js b/frontend/src/config/api.js index d8dd5e5..86fd463 100644 --- a/frontend/src/config/api.js +++ b/frontend/src/config/api.js @@ -4,7 +4,7 @@ */ export const API_CONFIG = { - baseUrl: import.meta.env.VITE_API_URL || 'http://localhost:3010', + baseUrl: import.meta.env.VITE_API_URL || '', wsUrl: import.meta.env.VITE_WS_URL || 'ws://localhost:5010', timeout: parseInt(import.meta.env.VITE_API_TIMEOUT || '30000'), retryAttempts: parseInt(import.meta.env.VITE_API_RETRY_ATTEMPTS || '3'),