fix(dashboard): Home page crashed when latest_video.top_tickers undefined
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:
Viktor Barzin 2026-05-27 18:01:34 +00:00
parent 1aeb6e8587
commit 04e3add4d5

View file

@ -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)}%`}