Skip to content

Commit 92df869

Browse files
committed
Apply the same sorting to other buckets.
1 parent 4e60e7a commit 92df869

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/shared/components/challenge-listing/Listing/Bucket/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export default function Bucket({
5858
refs.current.push(el);
5959
}
6060
};
61-
const activeSort = sort || 'updated';
61+
const activeSort = sort || 'startDate';
6262

6363
const sortedChallenges = activeBucket === 'all' ? _.clone(challenges.slice(0, 10)) : _.clone(challenges);
6464
// sortedChallenges.sort(Sort[activeSort].func);

src/shared/reducers/challenge-listing/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -810,8 +810,8 @@ function create(initialState) {
810810
selectedCommunityId: 'All',
811811

812812
sorts: {
813-
ongoing: 'updated',
814-
openForRegistration: 'updated',
813+
ongoing: 'startDate',
814+
openForRegistration: 'startDate',
815815
my: 'startDate',
816816
// past: 'updated',
817817
reviewOpportunities: 'review-opportunities-start-date',

src/shared/utils/challenge-listing/buckets.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export const BUCKET_DATA = {
5252
// hideCount: false,
5353
name: 'Open for registration',
5454
sorts: [
55-
SORTS.MOST_RECENT,
55+
SORTS.MOST_RECENT_START_DATE,
5656
// SORTS.TIME_TO_REGISTER,
5757
// SORTS.TIME_TO_SUBMIT,
5858
// SORTS.NUM_REGISTRANTS,
@@ -71,7 +71,7 @@ export const BUCKET_DATA = {
7171
// hideCount: false,
7272
name: 'Ongoing challenges',
7373
sorts: [
74-
SORTS.MOST_RECENT,
74+
SORTS.MOST_RECENT_START_DATE,
7575
// SORTS.CURRENT_PHASE,
7676
SORTS.TITLE_A_TO_Z,
7777
// SORTS.PRIZE_HIGH_TO_LOW,

0 commit comments

Comments
 (0)