Skip to content

Commit

Permalink
Applies the alpha sort to only branches
Browse files Browse the repository at this point in the history
Applies the alpha sort to only branches

Format check

Revert "Format check"

This reverts commit 76fba2a.

Removes additional format changes added by prettier run
  • Loading branch information
CGoodwin90 committed Mar 26, 2024
1 parent 08c5e45 commit 81f97dc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/pages/project.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,11 @@ export const PageProject = ({ router }) => {
}
// Sort alphabetically by environmentType and then deployType
const environments = R.sortWith(
[R.descend(R.prop('environmentType')), R.ascend(R.prop('deployType')), R.ascend(R.prop('name'))],
[
R.descend(R.prop('environmentType')),
R.ascend(R.prop('deployType')),
R.ascend(env => (env.deployType === 'branch' ? env.name : null)),
],
project.environments
);
const environmentCount = environments.length;
Expand Down

0 comments on commit 81f97dc

Please sign in to comment.