Update app/components/home/tab-content.tsx
All checks were successful
Deploy to Netlify / Deploy to Netlify (push) Successful in 1m24s

This commit is contained in:
Nathan 2025-09-29 11:52:42 +02:00
parent 7941e60928
commit fa374e15a6

View file

@ -45,7 +45,9 @@ export default function TabContent({
(day) => collesByDay[day] && collesByDay[day].length > 0 (day) => collesByDay[day] && collesByDay[day].length > 0
); );
for (const day of days) { 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) { if (!isSorted) {
collesByDay[day].reverse() collesByDay[day].reverse()
} }