Skip to content

Commit

Permalink
Merge branch 'feature/fix-sorting-algorithm-for-firefox' into q/127.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bert-e committed Apr 17, 2024
2 parents 99e640d + e8c17ea commit 2510677
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions shell-ui/src/navbar/NavBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,22 +159,18 @@ export const useNavbarLinksToActions = (
.sort((a, b) => {
if (!a.view.isFederated || !b.view.isFederated) {
return 0;
}
if (a.view.view.path === '/') {
return -1;
}
if (a.view.view.exact && !b.view.view.exact) {
return -1;
}
if (!a.view.view.exact && b.view.view.exact) {
return 1;
}
if (a.view.view.strict && !b.view.view.strict) {
} else if (
(a.view.view.exact && !b.view.view.exact) ||
(a.view.view.strict && !b.view.view.strict)
) {
return -1;
}
if (!a.view.view.strict && b.view.view.strict) {
} else if (
(!a.view.view.exact && b.view.view.exact) ||
(!a.view.view.strict && b.view.view.strict)
) {
return 1;
}

return 0;
})
.find((link) =>
Expand Down

0 comments on commit 2510677

Please sign in to comment.