diff --git a/app/components/home/tab-content.tsx b/app/components/home/tab-content.tsx index 683a2fd..00c113f 100644 --- a/app/components/home/tab-content.tsx +++ b/app/components/home/tab-content.tsx @@ -44,6 +44,12 @@ export default function TabContent({ const days = WEEK_DAYS.filter( (day) => collesByDay[day] && collesByDay[day].length > 0 ); + for (const day of days) { + collesByDay[day]?.sort((a, b) => a?.date - b?.date) + if (!isSorted) { + collesByDay[day].reverse() + } + } // If not sorted, reverse the order of days if (!isSorted) { days.reverse();