Update app/components/home/tab-content.tsx
All checks were successful
Deploy to Netlify / Deploy to Netlify (push) Successful in 1m46s
All checks were successful
Deploy to Netlify / Deploy to Netlify (push) Successful in 1m46s
This commit is contained in:
parent
447ac7edf9
commit
34a4b3f093
1 changed files with 6 additions and 0 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue