From 5b947aac73bf1e4f70fcc200f1ea74ec98d2032d Mon Sep 17 00:00:00 2001 From: Jackson Harper Date: Fri, 17 Mar 2023 16:22:49 +0800 Subject: [PATCH] Filter library items with no highlights from the highlights mode --- .../web/components/templates/homeFeed/HighlightsLayout.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/web/components/templates/homeFeed/HighlightsLayout.tsx b/packages/web/components/templates/homeFeed/HighlightsLayout.tsx index 9d445f05d..27f04fd28 100644 --- a/packages/web/components/templates/homeFeed/HighlightsLayout.tsx +++ b/packages/web/components/templates/homeFeed/HighlightsLayout.tsx @@ -84,7 +84,9 @@ export function HighlightItemsLayout( useEffect(() => { dispatchList({ type: 'RESET', - items: props.items, + items: props.items.filter( + (item) => item.node.highlights && item.node.highlights.length > 0 + ), }) }, [props.items])