Skip to content

Commit

Permalink
fix: semester obj was sorted when courses page loaded #359
Browse files Browse the repository at this point in the history
  • Loading branch information
ImJustChew committed Jun 10, 2024
1 parent e0d0b70 commit 6d90a55
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const SemesterSelector = () => {
<SelectValue placeholder="Semester" />
</SelectTrigger>
<SelectContent>
{semesterInfo.sort((a, b) => parseInt(b.id) - parseInt(a.id)).map(item => <SelectItem value={item.id} key={item.id}>
{[...semesterInfo].sort((a, b) => parseInt(b.id) - parseInt(a.id)).map(item => <SelectItem value={item.id} key={item.id}>
{toPrettySemester(item.id)} 學期
</SelectItem>)}
</SelectContent>
Expand Down

0 comments on commit 6d90a55

Please sign in to comment.