Skip to content

Commit

Permalink
Always sort by time
Browse files Browse the repository at this point in the history
  • Loading branch information
omfj committed Aug 29, 2024
1 parent d16d7dc commit 051068c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apps/web/src/lib/csv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ export type FullHappening = Exclude<Awaited<ReturnType<typeof getFullHappening>>
*/
export const toCsv = (happening: FullHappening, selectedHeaders: Array<string> = []) => {
const registrations = happening.registrations
.sort((a, b) => {
return a.createdAt.getTime() - b.createdAt.getTime();
})
.map((r) => {
const answers = r.answers.map((a) => ({
questionId: a.questionId,
Expand Down

0 comments on commit 051068c

Please sign in to comment.