mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-09-11 09:54:36 +00:00
Refactor GitHubStarsButton to wrap in Link component for external navigation
This commit is contained in:
parent
4493d86e51
commit
e996776781
1 changed files with 31 additions and 23 deletions
|
@ -2,6 +2,7 @@ import type { VariantProps } from "class-variance-authority";
|
||||||
|
|
||||||
import { cva } from "class-variance-authority";
|
import { cva } from "class-variance-authority";
|
||||||
import { StarIcon } from "lucide-react";
|
import { StarIcon } from "lucide-react";
|
||||||
|
import Link from "next/link";
|
||||||
|
|
||||||
import type { ButtonProps as ButtonPrimitiveProps } from "@/components/animate-ui/primitives/buttons/button";
|
import type { ButtonProps as ButtonPrimitiveProps } from "@/components/animate-ui/primitives/buttons/button";
|
||||||
import type { GithubStarsProps } from "@/components/animate-ui/primitives/animate/github-stars";
|
import type { GithubStarsProps } from "@/components/animate-ui/primitives/animate/github-stars";
|
||||||
|
@ -71,6 +72,12 @@ function GitHubStarsButton({
|
||||||
...props
|
...props
|
||||||
}: GitHubStarsButtonProps) {
|
}: GitHubStarsButtonProps) {
|
||||||
return (
|
return (
|
||||||
|
<Link
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
data-umami-event="github-stars"
|
||||||
|
href={`https://github.com/${username}/${repo}`}
|
||||||
|
>
|
||||||
<GithubStars
|
<GithubStars
|
||||||
asChild
|
asChild
|
||||||
username={username}
|
username={username}
|
||||||
|
@ -95,6 +102,7 @@ function GitHubStarsButton({
|
||||||
</GithubStarsParticles>
|
</GithubStarsParticles>
|
||||||
</ButtonPrimitive>
|
</ButtonPrimitive>
|
||||||
</GithubStars>
|
</GithubStars>
|
||||||
|
</Link>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue