From 6ff19102be96baa1352bae530c5c3815152e4cab Mon Sep 17 00:00:00 2001 From: Xavilien Date: Sat, 27 Jan 2024 16:58:30 -0500 Subject: [PATCH] Added sorting based on startTime --- src/components/admin/CheckInTable/index.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/admin/CheckInTable/index.tsx b/src/components/admin/CheckInTable/index.tsx index 395a114..1969e85 100644 --- a/src/components/admin/CheckInTable/index.tsx +++ b/src/components/admin/CheckInTable/index.tsx @@ -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)