fix(dashboard): Home page crashed when latest_video.top_tickers undefined
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
/api/meet-kevin/dashboard returns a latest_video summary that doesn't include top_tickers (only the list endpoint does). Calling .slice() on undefined crashed the whole page. Guard with ?? [] so the chip row simply renders empty when the dashboard endpoint hasn't enriched the latest video yet.
This commit is contained in:
parent
1aeb6e8587
commit
04e3add4d5
1 changed files with 1 additions and 1 deletions
|
|
@ -118,7 +118,7 @@ export default function MeetKevinHome() {
|
|||
{video.outlook}
|
||||
</span>
|
||||
)}
|
||||
{video.top_tickers.slice(0, 5).map((t) => (
|
||||
{(video.top_tickers ?? []).slice(0, 5).map((t) => (
|
||||
<span
|
||||
key={t.symbol}
|
||||
title={`${t.action} · conviction ${Math.round(t.conviction * 100)}%`}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue