Skip to content

Commit

Permalink
Merge pull request #170 from uclaacm/order-events
Browse files Browse the repository at this point in the history
sort events by timestamp
  • Loading branch information
AVDestroyer committed Apr 23, 2024
2 parents 8c5eb2e + 2c63519 commit 0d9ef95
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions data/events.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import eventsData from "./events.json" assert { type: "json" }
import eventsRaw from "./events.json" assert { type: "json" }

export interface CyaneaEvent {
id: string
Expand All @@ -13,7 +13,10 @@ export interface CyaneaEvent {
meta?: Record<string, any> | null
}

export default eventsData as CyaneaEvent[];
let eventsData = eventsRaw as CyaneaEvent[];
eventsData.sort((a,b) => a.start - b.start);
export default eventsData;


export interface EventType {
name: string;
Expand Down

0 comments on commit 0d9ef95

Please sign in to comment.