Skip to content

Commit

Permalink
chore: sort link cards (rupali-codes#394)
Browse files Browse the repository at this point in the history
  • Loading branch information
OscarFMdev authored Apr 6, 2023
1 parent 4190b06 commit f1d4772
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions components/Cards/CardsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ const CardsList:FC<{ cards: IData[] }> = (props) => {
setCurrentCard(null);
}

cards.sort((a: IData, b: IData) => {
if (a.name < b.name) return -1;
if (a.name > b.name) return 1;
return 0;
});

return (
<>
<ul className={`flex w-full w-full flex-wrap content-start gap-4 md:flex-row`}>
Expand Down

0 comments on commit f1d4772

Please sign in to comment.