-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
37d5136
commit fa3b433
Showing
2 changed files
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
//@ts-ignore | ||
export default function Tag({ blog }) { | ||
return ( | ||
<div className="text-neutral-600 dark:text-neutral-400 text-base rounded-lg mb-4 overflow-hidden overflow-y-auto "> | ||
{//@ts-ignore | ||
blog.tags.map((tag, index) => { | ||
return ( | ||
<> | ||
<a href={`#${tag}`}> | ||
<span className="hover:underline">{`#${tag}`}</span> | ||
</a> | ||
{index !== blog.tags.length - 1 && ", "} {/* Add a comma after each tag except the last one */} | ||
</> | ||
) | ||
}) | ||
} | ||
</div> | ||
) | ||
} |