Skip to content

Commit

Permalink
Fixed the sorting of review periods to make it quicker to find the op…
Browse files Browse the repository at this point in the history
…en review periods.
  • Loading branch information
ocielliottc authored and mkimberlin committed Nov 5, 2024
1 parent 3b38133 commit 1a41904
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions web-ui/src/components/reviews/periods/ReviewPeriods.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -389,11 +389,14 @@ const ReviewPeriods = ({ onPeriodSelected, mode }) => {
) : periods.length > 0 ? (
periods
.sort((a, b) => {
const aName = (a.name || '');
return a.reviewStatus === b.reviewStatus
? (a.name || '').localeCompare(b.name)
? aName.localeCompare(b.name)
: a.reviewStatus === ReviewStatus.OPEN
? -1
: 1;
: (b.reviewStatus === ReviewStatus.OPEN
? 1
: aName.localeCompare(b.name));
})
.map((period) => (
<div>
Expand Down

0 comments on commit 1a41904

Please sign in to comment.