Skip to content

Commit

Permalink
Added sorting based on startTime
Browse files Browse the repository at this point in the history
  • Loading branch information
Xavilien committed Jan 27, 2024
1 parent fab8d38 commit 6ff1910
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/admin/CheckInTable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ const CheckInTable = (): ReactElement => {
setLoading(true)
try {
const { data } = await dispatch(actions.checkin.allCheckInItems())
data.sort((a: { startTime: number }, b: { startTime: number }) => {
return a.startTime > b.startTime
})
setCheckIns(data)
} catch (err) {
console.error(err)
Expand Down

0 comments on commit 6ff1910

Please sign in to comment.