Add new home section to top.

This commit is contained in:
James Grugett 2022-09-23 16:39:17 -04:00
parent 1a5dcdedcc
commit 77ddc456a2

View File

@ -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)))