Skip to content

Commit

Permalink
fix gap sort by date
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeyArenzon committed Dec 2, 2023
1 parent 79edd8f commit 16804f3
Show file tree
Hide file tree
Showing 2 changed files with 10,452 additions and 15,442 deletions.
3 changes: 3 additions & 0 deletions src/pages/GapsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,9 @@ const GapsPage = () => {
{gaps
?.filter((gap) => gap.gtfsTime || gap.siriTime)
.filter((gap) => !onlyGapped || !gap.gtfsTime || !gap.siriTime)
.sort((t1, t2) => {
return Number((t1?.siriTime || t1?.gtfsTime)?.diff(t2?.siriTime || t2?.gtfsTime))
})
.map((gap, i) => (
<Row key={i}>
<Cell>{formatTime(gap.gtfsTime || gap.siriTime || moment())}</Cell>
Expand Down
Loading

0 comments on commit 16804f3

Please sign in to comment.