import { useState, useEffect } from 'react'; const API_BASE = import.meta.env.VITE_API_URL || ''; function SentimentDot({ sentiment }) { if (sentiment === 'BULLISH') return ; if (sentiment === 'BEARISH') return ; return ; } export default function NewsFeedPanel() { const [news, setNews] = useState([]); const [loading, setLoading] = useState(true); useEffect(() => { const fetchNews = () => { fetch(`${API_BASE}/api/market/news`) .then(r => r.json()) .then(d => { if (d.success) setNews(d.data || []); }) .catch(console.error) .finally(() => setLoading(false)); }; fetchNews(); const interval = setInterval(fetchNews, 300000); // 5min return () => clearInterval(interval); }, []); return (