Skip to content

Commit

Permalink
reversed sorting of seasons
Browse files Browse the repository at this point in the history
  • Loading branch information
ThatMegamind committed Mar 1, 2024
1 parent 7e686d7 commit 19266e5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pages/PublishedSchedule/PublishedSchedule.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ const PublishedSchedule = () => {
data.sort((a, b) => {
// Compare years first
if (a.split(' ')[1] !== b.split(' ')[1]) {
return a.split(' ')[1] - b.split(' ')[1];
return b.split(' ')[1] - a.split(' ')[1];
} else {
// If years are equal, compare alphabetically
return a.localeCompare(b);
return -1*a.localeCompare(b);
}
});
setAllSeasons(data);
Expand All @@ -59,7 +59,7 @@ const PublishedSchedule = () => {
fontWeight="bold"
size="lg"
onChange={() => setSelectedSeason(event.target.value)}
width="23%"
width="25%"
>
{allSeasons.map(item => (
<option key={item} value={item}>
Expand Down

0 comments on commit 19266e5

Please sign in to comment.