feat: better nav sorting

This commit is contained in:
Cory Dransfeldt 2024-07-14 19:35:10 -07:00
parent f5adf0ba06
commit 4b908fc3df
No known key found for this signature in database
3 changed files with 6 additions and 6 deletions

View file

@ -23,12 +23,12 @@ const fetchAllNavigation = async () => {
title: item.pages.title,
permalink: item.pages.permalink,
icon: item.icon,
position: item.position
sort: item.sort
} : {
title: item.title,
permalink: item.permalink,
icon: item.icon,
position: item.position
sort: item.sort
}
if (!menu[item.menu_location]) {
@ -39,7 +39,7 @@ const fetchAllNavigation = async () => {
})
Object.keys(menu).forEach(location => {
menu[location].sort((a, b) => a.position - b.position)
menu[location].sort((a, b) => a.sort - b.sort)
})
return menu