mirror of
https://github.com/yusufipk/OpenFrame.git
synced 2026-09-11 17:46:06 +00:00
Three places still carried the old promise. The register form, which is where the CTA lands and where the trial is granted, said nothing about it at all, so the landing page's claim had to be taken on faith across a page load. The comparison profile summary still described the trial without mentioning the card. And the CtaLink comment quoted a button label that no longer exists. The hero and closing CTAs now read 'Open dashboard' for a signed-in visitor. That button already pointed at /dashboard for them, and offering a free trial to someone who is mid-subscription reads as a bug. The pricing card keeps the short label because it sits directly under 'No credit card' and the card narrows to about 230px at the md breakpoint, where the long label would wrap out of a fixed-height button.
30 lines
709 B
TypeScript
30 lines
709 B
TypeScript
'use client';
|
|
|
|
import Link from 'next/link';
|
|
import { trackCtaClick } from '@/lib/client/track';
|
|
|
|
interface CtaLinkProps {
|
|
href: string;
|
|
className?: string;
|
|
children: React.ReactNode;
|
|
}
|
|
|
|
/**
|
|
* A marketing call to action that reports the click.
|
|
*
|
|
* Only the signup CTA counts. The same button points at `/dashboard` once you
|
|
* are signed in, and an existing customer clicking through to their own
|
|
* dashboard is not a step in the acquisition funnel.
|
|
*/
|
|
export function CtaLink({ href, className, children }: CtaLinkProps) {
|
|
return (
|
|
<Link
|
|
href={href}
|
|
className={className}
|
|
onClick={href === '/register' ? trackCtaClick : undefined}
|
|
>
|
|
{children}
|
|
</Link>
|
|
);
|
|
}
|