Update app/components/home/tab-content.tsx
All checks were successful
Deploy to Netlify / Deploy to Netlify (push) Successful in 1m24s
All checks were successful
Deploy to Netlify / Deploy to Netlify (push) Successful in 1m24s
This commit is contained in:
parent
7941e60928
commit
fa374e15a6
1 changed files with 3 additions and 1 deletions
|
|
@ -45,7 +45,9 @@ export default function TabContent({
|
|||
(day) => collesByDay[day] && collesByDay[day].length > 0
|
||||
);
|
||||
for (const day of days) {
|
||||
collesByDay[day]?.sort((a, b) => new Date(a?.date) - new Date(b?.date))
|
||||
// Group by examiner name/subject then sort by date
|
||||
collesByDay[day]?.sort((a, b) => a.examiner.name?.localCompare(b.examiner.name))
|
||||
.sort((a, b) => new Date(a?.date).getTime() - new Date(b?.date).getTime())
|
||||
if (!isSorted) {
|
||||
collesByDay[day].reverse()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue