Skip to content

Commit

Permalink
sort
Browse files Browse the repository at this point in the history
  • Loading branch information
ShotaKitazawa committed Jan 14, 2024
1 parent 08b349f commit 1ee76fd
Showing 1 changed file with 21 additions and 19 deletions.
40 changes: 21 additions & 19 deletions client/src/components/LinkGroups/LinkGroups.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,25 +35,27 @@ export const LinkGroups: React.FC<Props> = (props) => {
return (
<>
{linkInfoByTags != null ? (
Array.from(linkInfoByTags.keys()).map((tagName) => (
<>
{tagName != '' ? (
<>
<div className="grid grid-cols-7">
<h2 className="col-start-2 text-4xl mt-20 font-bold">
{tagName}
</h2>
</div>
<div className="grid grid-cols-8">
<hr className="col-start-2 col-end-8 h-px my-4 bg-gray-200 border-0" />
</div>
</>
) : (
<></>
)}
<Links linksList={linkInfoByTags.get(tagName)} />
</>
))
Array.from(linkInfoByTags.keys())
.sort()
.map((tagName) => (
<>
{tagName != '' ? (
<>
<div className="grid grid-cols-7">
<h2 className="col-start-2 text-4xl mt-20 font-bold">
{tagName}
</h2>
</div>
<div className="grid grid-cols-8">
<hr className="col-start-2 col-end-8 h-px my-4 bg-gray-200 border-0" />
</div>
</>
) : (
<></>
)}
<Links linksList={linkInfoByTags.get(tagName)} />
</>
))
) : (
<CircularProgress />
)}
Expand Down

0 comments on commit 1ee76fd

Please sign in to comment.