Update app/components/home/tab-content.tsx
All checks were successful
Deploy to Netlify / Deploy to Netlify (push) Successful in 1m32s
All checks were successful
Deploy to Netlify / Deploy to Netlify (push) Successful in 1m32s
This commit is contained in:
parent
fa374e15a6
commit
3a15e60644
1 changed files with 6 additions and 2 deletions
|
|
@ -46,8 +46,12 @@ export default function TabContent({
|
||||||
);
|
);
|
||||||
for (const day of days) {
|
for (const day of days) {
|
||||||
// Group by examiner name/subject then sort by date
|
// Group by examiner name/subject then sort by date
|
||||||
collesByDay[day]?.sort((a, b) => a.examiner.name?.localCompare(b.examiner.name))
|
collesByDay[day]?.sort((a, b) => {
|
||||||
.sort((a, b) => new Date(a?.date).getTime() - new Date(b?.date).getTime())
|
const nameA = a?.examiner?.name || "";
|
||||||
|
const nameB = b?.examiner?.name || "";
|
||||||
|
return nameA.localeCompare(nameB);
|
||||||
|
})
|
||||||
|
collesByDay[day]?.sort((a, b) => new Date(a?.date).getTime() - new Date(b?.date).getTime())
|
||||||
if (!isSorted) {
|
if (!isSorted) {
|
||||||
collesByDay[day].reverse()
|
collesByDay[day].reverse()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue