fix: support for tracking link clicks
This commit is contained in:
@@ -7,12 +7,14 @@ import { login } from "@/constants/routes/handleAuth"
|
||||
|
||||
import Link from "@/components/TempDesignSystem/Link"
|
||||
|
||||
import type { TrackableLoginId } from "@/types/components/tracking"
|
||||
import { LangParams } from "@/types/params"
|
||||
|
||||
export default function LoginButton({
|
||||
className,
|
||||
trackingId,
|
||||
lang,
|
||||
}: LangParams & { className: string }) {
|
||||
}: LangParams & { className: string; trackingId: TrackableLoginId }) {
|
||||
const { formatMessage } = useIntl()
|
||||
const pathName = usePathname()
|
||||
|
||||
@@ -20,6 +22,7 @@ export default function LoginButton({
|
||||
<Link
|
||||
href={`${login[lang]}?redirectTo=${encodeURIComponent(`/${lang}${pathName}`)}`}
|
||||
className={className}
|
||||
id={trackingId}
|
||||
>
|
||||
{formatMessage({ id: "Log in" })}
|
||||
</Link>
|
||||
|
||||
Reference in New Issue
Block a user