We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1c97098 commit 330ea7aCopy full SHA for 330ea7a
course-matrix/frontend/src/pages/Home/Home.tsx
@@ -73,9 +73,11 @@ const Home = () => {
73
) : (
74
[...data]
75
.sort((a: Timetable, b: Timetable) => {
76
+ if(a.favorite==b.favorite)
77
+ return (b?.updated_at.localeCompare(a?.updated_at));
78
if(a.favorite) return 1;
79
if(b.favorite) return -1;
- return b?.updated_at.localeCompare(a?.updated_at);
80
+ return 0;
81
})
82
.map((timetable) => (
83
<TimetableCard
0 commit comments