Skip to content

Commit c4074f9

Browse files
committed
Expand ProjectHoverContent to conditionally display GitHub and documentation links when showAll is true.
1 parent 215e30a commit c4074f9

File tree

1 file changed

+32
-1
lines changed

1 file changed

+32
-1
lines changed

src/components/shared/ProjectHoverContent.tsx

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,38 @@ export function LinkIcons({ entry, showAll = false }: { entry: DirectoryEntry; s
4646
>
4747
<Globe className="size-5" />
4848
</a>
49-
{docs ? (
49+
{showAll ? (
50+
<>
51+
{github && (
52+
<a
53+
href={`https://github.com/${github}`}
54+
target="_blank"
55+
rel="noopener noreferrer"
56+
className="text-muted-foreground hover:text-foreground transition-colors"
57+
title="GitHub"
58+
data-umami-event="outbound_click"
59+
data-umami-event-type="github"
60+
data-umami-event-project={name}
61+
>
62+
<GithubLogo className="size-5" />
63+
</a>
64+
)}
65+
{docs && (
66+
<a
67+
href={docs}
68+
target="_blank"
69+
rel="noopener noreferrer"
70+
className="text-muted-foreground hover:text-foreground transition-colors"
71+
title="Documentation"
72+
data-umami-event="outbound_click"
73+
data-umami-event-type="docs"
74+
data-umami-event-project={name}
75+
>
76+
<FileText className="size-5" />
77+
</a>
78+
)}
79+
</>
80+
) : docs ? (
5081
<a
5182
href={docs}
5283
target="_blank"

0 commit comments

Comments
 (0)