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

This commit is contained in:
Nathan 2025-09-29 11:34:02 +02:00
parent 447ac7edf9
commit 34a4b3f093

View file

@ -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();