summaryrefslogtreecommitdiffstats
path: root/web/react/components/navbar_dropdown.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'web/react/components/navbar_dropdown.jsx')
-rw-r--r--web/react/components/navbar_dropdown.jsx18
1 files changed, 1 insertions, 17 deletions
diff --git a/web/react/components/navbar_dropdown.jsx b/web/react/components/navbar_dropdown.jsx
index 937e88325..029b9c137 100644
--- a/web/react/components/navbar_dropdown.jsx
+++ b/web/react/components/navbar_dropdown.jsx
@@ -18,24 +18,8 @@ function getStateFromStores() {
teams.push(teamsObject[teamId]);
}
}
- teams.sort((teamA, teamB) => {
- let teamADisplayName = '';
- let teamBDisplayName = '';
- if (teamA && teamA.display_name) {
- teamADisplayName = teamA.display_name.toLowerCase();
- }
- if (teamB && teamB.display_name) {
- teamBDisplayName = teamB.display_name.toLowerCase();
- }
-
- if (teamADisplayName < teamBDisplayName) {
- return -1;
- } else if (teamADisplayName > teamBDisplayName) {
- return 1;
- }
- return 0;
- });
+ teams.sort(Utils.sortByDisplayName);
return {teams};
}