mirror of
https://github.com/lumina-rocks/lumina.git
synced 2026-04-09 23:16:47 +02:00
Make hashtags in PictureCard and PictureDetails clickable to navigate to tag pages
This commit is contained in:
@@ -185,7 +185,15 @@ export function PictureCard({ event }: PictureCardProps) {
|
||||
{hashtags.length > 0 && (
|
||||
<div className="flex flex-wrap gap-2 mt-3">
|
||||
{hashtags.map((tag) => (
|
||||
<Badge key={tag} variant="secondary" className="text-xs">
|
||||
<Badge
|
||||
key={tag}
|
||||
variant="secondary"
|
||||
className="text-xs cursor-pointer hover:bg-secondary/80 transition-colors"
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
navigate(`/tag/${tag}`);
|
||||
}}
|
||||
>
|
||||
#{tag}
|
||||
</Badge>
|
||||
))}
|
||||
|
||||
@@ -185,7 +185,12 @@ function PictureDetailsContent({ event }: { event: NostrEvent }) {
|
||||
{hashtags.length > 0 && (
|
||||
<div className="flex flex-wrap gap-2">
|
||||
{hashtags.map((tag) => (
|
||||
<Badge key={tag} variant="secondary" className="text-sm">
|
||||
<Badge
|
||||
key={tag}
|
||||
variant="secondary"
|
||||
className="text-sm cursor-pointer hover:bg-secondary/80 transition-colors"
|
||||
onClick={() => navigate(`/tag/${tag}`)}
|
||||
>
|
||||
#{tag}
|
||||
</Badge>
|
||||
))}
|
||||
|
||||
Reference in New Issue
Block a user