mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-10-09 21:14:22 +00:00
35 lines
771 B
TypeScript
35 lines
771 B
TypeScript
"use client";
|
|
|
|
import { useSearchParams } from "next/navigation";
|
|
|
|
import { CustomLink } from "@/components/shadcn/custom/custom-link";
|
|
import { appendAttributionToCallbackPath } from "@/lib/auth-callback-url";
|
|
import { extractUtmParams } from "@/lib/utm";
|
|
|
|
interface AuthFooterLinkProps {
|
|
text: string;
|
|
linkText: string;
|
|
href: string;
|
|
}
|
|
|
|
export const AuthFooterLink = ({
|
|
text,
|
|
linkText,
|
|
href,
|
|
}: AuthFooterLinkProps) => {
|
|
const searchParams = useSearchParams();
|
|
const targetHref = appendAttributionToCallbackPath(
|
|
href,
|
|
extractUtmParams(searchParams),
|
|
);
|
|
|
|
return (
|
|
<p className="text-center text-sm">
|
|
{text}
|
|
<CustomLink size="md" href={targetHref} target="_self">
|
|
{linkText}
|
|
</CustomLink>
|
|
</p>
|
|
);
|
|
};
|