mirror of
https://github.com/mroxso/zelo-news.git
synced 2026-06-04 09:31:14 +02:00
feat: make hashtags clickable links for improved navigation
This commit is contained in:
@@ -174,9 +174,13 @@ export function ArticleView({ post }: ArticleViewProps) {
|
||||
{hashtags.length > 0 && (
|
||||
<div className="flex flex-wrap gap-2">
|
||||
{hashtags.map((tag) => (
|
||||
<Badge key={tag} variant="secondary">
|
||||
#{tag}
|
||||
</Badge>
|
||||
<Link
|
||||
key={tag}
|
||||
to={`/search?q=%23${encodeURIComponent(tag)}`}
|
||||
className="hover:opacity-80"
|
||||
>
|
||||
<Badge variant="secondary">#{tag}</Badge>
|
||||
</Link>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user