Skip to content

Commit

Permalink
update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
scruffian committed Mar 3, 2023
1 parent f0acb27 commit c5eb33d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@ export default function SidebarNavigationScreenNavigationMenus() {
[]
);

// This is copied from the edit component of the Navigation block.
// Sort navigation menus by date.
const orderedNavigationMenus = useMemo(
() =>
navigationMenus?.sort( ( menuA, menuB ) => {
const menuADate = new Date( menuA.date );
const menuBDate = new Date( menuB.date );
return menuADate.getTime() > menuBDate.getTime(); // This condition is the other way in the navigation block... hmmmm...
return menuADate.getTime() > menuBDate.getTime();
} ),
[ navigationMenus ]
);
Expand Down

0 comments on commit c5eb33d

Please sign in to comment.