diff options
Diffstat (limited to 'src/cleaners/skyblock')
-rw-r--r-- | src/cleaners/skyblock/farmingContents.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/cleaners/skyblock/farmingContents.ts b/src/cleaners/skyblock/farmingContents.ts index 3727621..039c725 100644 --- a/src/cleaners/skyblock/farmingContents.ts +++ b/src/cleaners/skyblock/farmingContents.ts @@ -49,7 +49,11 @@ export function cleanFarmingContests(data: typedHypixelApi.SkyBlockProfileMember contestsByDate[contestByDateKey].push(cropData) } - const contests: PlayerFarmingContestStats[] = Object.entries(contestsByDate).map(([contestDateKey, crops]) => { + const contestsByDateEntries = Object.entries(contestsByDate) + // this is to sort by newest first + contestsByDateEntries.reverse() + + const contests: PlayerFarmingContestStats[] = contestsByDateEntries.map(([contestDateKey, crops]) => { const [year, month, day] = contestDateKey.split(':') return { year: parseInt(year), |