Skip to content

Commit bb9645f

Browse files
committed
Applies the alpha sort to only branches
1 parent 08c5e45 commit bb9645f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/pages/project.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,11 @@ export const PageProject = ({ router }) => {
8080
}
8181
// Sort alphabetically by environmentType and then deployType
8282
const environments = R.sortWith(
83-
[R.descend(R.prop('environmentType')), R.ascend(R.prop('deployType')), R.ascend(R.prop('name'))],
83+
[
84+
R.descend(R.prop('environmentType')),
85+
R.ascend(R.prop('deployType')),
86+
R.ascend(env => (env.deployType === 'branch' ? env.name : null)),
87+
],
8488
project.environments
8589
);
8690
const environmentCount = environments.length;

0 commit comments

Comments
 (0)