Skip to content

Commit

Permalink
Correct sorting of periods
Browse files Browse the repository at this point in the history
  • Loading branch information
kristoferlund committed Oct 23, 2023
1 parent 309f620 commit 7ccd3d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/frontend/src/model/periods/periods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export const AllPeriods = atom<PeriodDetailsDto[]>({
response.data as PeriodPaginatedResponseDto;
const periods = paginatedResponse.docs;
if (Array.isArray(periods) && periods.length > 0) {
return periods;
return periods.slice().reverse(); // Latest period first
}
}
return [];
Expand Down

0 comments on commit 7ccd3d2

Please sign in to comment.