Skip to content

Commit 1c5c325

Browse files
authored
Merge pull request #914 from topcoder-platform/MP-355
MP-355 fixes rating sorting on charts -> dev
2 parents 9bd1e6e + 2079cb5 commit 1c5c325

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/apps/profiles/src/hooks/useRatingHistoryOptions.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export function useRatingHistoryOptions(
3939
if (!trackHistory?.length) return undefined
4040

4141
options.series = [{
42-
data: trackHistory.sort((a, b) => b.date - a.date)
42+
data: trackHistory.sort((a, b) => get(b, dateField) - get(a, dateField))
4343
.map((hisChallenge: StatsHistory) => ({
4444
name: hisChallenge.challengeName,
4545
x: get(hisChallenge, dateField),

0 commit comments

Comments
 (0)