From afc61e6f4c03871070ce788451baf04f7b03b516 Mon Sep 17 00:00:00 2001 From: Yihao Wang Date: Mon, 14 Jul 2025 19:14:20 +1200 Subject: [PATCH] Fix typing --- src/components/Hero.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/components/Hero.tsx b/src/components/Hero.tsx index 9845b00..a05499d 100644 --- a/src/components/Hero.tsx +++ b/src/components/Hero.tsx @@ -82,9 +82,13 @@ export default function Hero() { const displayedTools = bookmarkedToolPaths.length > 0 - ? bookmarkedToolPaths - .map((path) => toolsMap.get(path)) - .filter((tools) => tools != undefined) + ? bookmarkedToolPaths.flatMap((path) => { + const tool = toolsMap.get(path); + if (tool === undefined) { + return []; + } + return [tool]; + }) : exampleTools; return (