From 77ddc456a26fd55aa87299d2db4ed001f4003476 Mon Sep 17 00:00:00 2001 From: James Grugett Date: Fri, 23 Sep 2022 16:39:17 -0400 Subject: [PATCH] Add new home section to top. --- web/pages/home/index.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/web/pages/home/index.tsx b/web/pages/home/index.tsx index de4e1c2f..c1a5f477 100644 --- a/web/pages/home/index.tsx +++ b/web/pages/home/index.tsx @@ -127,6 +127,10 @@ export const getHomeItems = (groups: Group[], sections: string[]) => { const sectionItems = filterDefined(sections.map((id) => itemsById[id])) + // Add new home section items to the top. + sectionItems.unshift( + ...HOME_SECTIONS.filter((item) => !sectionItems.includes(item)) + ) // Add unmentioned items to the end. sectionItems.push(...items.filter((item) => !sectionItems.includes(item)))