fix: change hardcoded localhost URLs to relative URLs so frontend works on production domain
Build Institutional Trader / build-and-deploy (push) Successful in 2m10s
Details
Build Institutional Trader / build-and-deploy (push) Successful in 2m10s
Details
This commit is contained in:
parent
cd83c18555
commit
2dba57191b
|
|
@ -1,6 +1,6 @@
|
||||||
import { useState, useEffect, useCallback } from 'react';
|
import { useState, useEffect, useCallback } from 'react';
|
||||||
|
|
||||||
const API_BASE = import.meta.env.VITE_API_URL || 'http://localhost:3010';
|
const API_BASE = import.meta.env.VITE_API_URL || '';
|
||||||
|
|
||||||
const CAP_TABS = [
|
const CAP_TABS = [
|
||||||
{ id: 'all', label: '🌐 All', color: 'text-slate-300' },
|
{ id: 'all', label: '🌐 All', color: 'text-slate-300' },
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { useState, useEffect } from 'react';
|
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 }) {
|
function SentimentDot({ sentiment }) {
|
||||||
if (sentiment === 'BULLISH') return <span className="inline-block w-2 h-2 rounded-full bg-emerald-400 mr-2 flex-shrink-0" />;
|
if (sentiment === 'BULLISH') return <span className="inline-block w-2 h-2 rounded-full bg-emerald-400 mr-2 flex-shrink-0" />;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { useState, useEffect } from 'react';
|
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 = '') {
|
function fmt(n, decimals = 2, prefix = '') {
|
||||||
if (n == null || isNaN(n)) return '—';
|
if (n == null || isNaN(n)) return '—';
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export const API_CONFIG = {
|
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',
|
wsUrl: import.meta.env.VITE_WS_URL || (typeof window !== 'undefined' ? (window.location.protocol === 'https:' ? 'wss:' : 'ws:') + '//' + window.location.host : ''),
|
||||||
timeout: parseInt(import.meta.env.VITE_API_TIMEOUT || '30000'),
|
timeout: parseInt(import.meta.env.VITE_API_TIMEOUT || '30000'),
|
||||||
retryAttempts: parseInt(import.meta.env.VITE_API_RETRY_ATTEMPTS || '3'),
|
retryAttempts: parseInt(import.meta.env.VITE_API_RETRY_ATTEMPTS || '3'),
|
||||||
retryDelay: parseInt(import.meta.env.VITE_API_RETRY_DELAY || '1000')
|
retryDelay: parseInt(import.meta.env.VITE_API_RETRY_DELAY || '1000')
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue