diff --git a/apps/web/src/lib/csv.ts b/apps/web/src/lib/csv.ts index b0809b71e..62af641f8 100644 --- a/apps/web/src/lib/csv.ts +++ b/apps/web/src/lib/csv.ts @@ -17,6 +17,9 @@ export type FullHappening = Exclude> */ export const toCsv = (happening: FullHappening, selectedHeaders: Array = []) => { 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,