Skip to content

Commit 4e19bb8

Browse files
fix(ui): include UTM params in logo href directly
The logo link was hardcoded to https://www.prisma.io with no UTM params, relying entirely on the click handler to append them. Now the logo href includes UTM params from the component props when present — same pattern used for the Login/Signup buttons. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 64a04c4 commit 4e19bb8

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

packages/ui/src/components/web-navigation.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ export function WebNavigation({
7878
const [mobileView, setMobileView] = useState(false);
7979
const loginHref = buildConsoleHref("/login", utm, preserveExactUtm);
8080
const signupHref = buildConsoleHref("/sign-up", utm, preserveExactUtm);
81+
const logoHref = preserveExactUtm && utm
82+
? `https://www.prisma.io?${new URLSearchParams(Object.entries(utm).filter(([k, v]) => k.startsWith("utm_") && v)).toString()}`
83+
: "https://www.prisma.io";
8184

8285
useEffect(() => {
8386
if (mobileView) {
@@ -94,7 +97,7 @@ export function WebNavigation({
9497
<NavigationMenuItem className="outline-none!">
9598
<NavigationMenuLink
9699
className="shrink-0 w-full p-0 hover:bg-transparent focus:bg-transparent focus-visible:outline-none focus-visible:ring-0"
97-
href="https://www.prisma.io"
100+
href={logoHref}
98101
>
99102
{Logo}
100103
</NavigationMenuLink>

0 commit comments

Comments
 (0)