fix: financial feed news cards - layout, scrolling & clickable links
Browse files- Remove glass-panel class from news cards (had overflow:hidden causing collapse)
- Add flexShrink: 0 to prevent flex shrinking in scroll container
- Replace div+onClick with native <a> tag for bulletproof click-to-open
- Add real URLs to all 6 fallback news items (Bloomberg, Reuters, CoinDesk, CNBC, WSJ, MarketWatch)
- Map link/url/article_url from live API response in parser
- Fix welcome banner alignment by removing glass-panel class inheritance
- Make Financial Feed scroll independently with maxHeight: 520px + overflowY: auto
frontend/src/components/TrendingHub.tsx
CHANGED
|
@@ -359,14 +359,12 @@ export default function TrendingHub({ onAddTicker }: TrendingHubProps) {
|
|
| 359 |
}}
|
| 360 |
>
|
| 361 |
{news.map((item) => (
|
| 362 |
-
<
|
| 363 |
key={item.id}
|
|
|
|
|
|
|
|
|
|
| 364 |
className="genz-news-card"
|
| 365 |
-
onClick={() => {
|
| 366 |
-
if (item.link) {
|
| 367 |
-
window.open(item.link, '_blank', 'noopener,noreferrer');
|
| 368 |
-
}
|
| 369 |
-
}}
|
| 370 |
style={{
|
| 371 |
padding: '16px',
|
| 372 |
borderRadius: '12px',
|
|
@@ -378,8 +376,10 @@ export default function TrendingHub({ onAddTicker }: TrendingHubProps) {
|
|
| 378 |
transition: 'all 0.2s ease',
|
| 379 |
background: 'rgba(13, 16, 27, 0.5)',
|
| 380 |
backdropFilter: 'blur(10px)',
|
| 381 |
-
cursor:
|
| 382 |
-
flexShrink: 0
|
|
|
|
|
|
|
| 383 |
}}
|
| 384 |
title={item.link ? "Click to read full article" : ""}
|
| 385 |
>
|
|
@@ -412,7 +412,7 @@ export default function TrendingHub({ onAddTicker }: TrendingHubProps) {
|
|
| 412 |
<span>Source: <strong style={{ color: 'var(--text-secondary)' }}>{item.source}</strong></span>
|
| 413 |
{item.link && <span style={{ color: 'var(--neon-cyan)', fontSize: '10px', fontWeight: 600 }}>Read More →</span>}
|
| 414 |
</div>
|
| 415 |
-
</
|
| 416 |
))}
|
| 417 |
</div>
|
| 418 |
</div>
|
|
|
|
| 359 |
}}
|
| 360 |
>
|
| 361 |
{news.map((item) => (
|
| 362 |
+
<a
|
| 363 |
key={item.id}
|
| 364 |
+
href={item.link || '#'}
|
| 365 |
+
target="_blank"
|
| 366 |
+
rel="noopener noreferrer"
|
| 367 |
className="genz-news-card"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 368 |
style={{
|
| 369 |
padding: '16px',
|
| 370 |
borderRadius: '12px',
|
|
|
|
| 376 |
transition: 'all 0.2s ease',
|
| 377 |
background: 'rgba(13, 16, 27, 0.5)',
|
| 378 |
backdropFilter: 'blur(10px)',
|
| 379 |
+
cursor: 'pointer',
|
| 380 |
+
flexShrink: 0,
|
| 381 |
+
textDecoration: 'none',
|
| 382 |
+
color: 'inherit'
|
| 383 |
}}
|
| 384 |
title={item.link ? "Click to read full article" : ""}
|
| 385 |
>
|
|
|
|
| 412 |
<span>Source: <strong style={{ color: 'var(--text-secondary)' }}>{item.source}</strong></span>
|
| 413 |
{item.link && <span style={{ color: 'var(--neon-cyan)', fontSize: '10px', fontWeight: 600 }}>Read More →</span>}
|
| 414 |
</div>
|
| 415 |
+
</a>
|
| 416 |
))}
|
| 417 |
</div>
|
| 418 |
</div>
|