From 4440cb27a83e007bc027b3fd6592160ee734bedd Mon Sep 17 00:00:00 2001 From: Sahaj Jain Date: Mon, 21 Jul 2025 21:49:29 +0530 Subject: [PATCH] add more touchpoints for pricing page --- app/ai/components/ai-announcement.tsx | 17 +++++++---- components/get-pro-cta.tsx | 4 +-- components/home/ai-generation-cta.tsx | 27 ++++++++++++------ components/home/header.tsx | 41 +++++++++++++++++++++------ 4 files changed, 64 insertions(+), 25 deletions(-) diff --git a/app/ai/components/ai-announcement.tsx b/app/ai/components/ai-announcement.tsx index a44c3247..feaec178 100644 --- a/app/ai/components/ai-announcement.tsx +++ b/app/ai/components/ai-announcement.tsx @@ -1,18 +1,25 @@ +"use client"; + +import { useSubscription } from "@/hooks/use-subscription"; import { ArrowRight } from "lucide-react"; import Link from "next/link"; export function AIAnnouncement() { + const { subscriptionStatus, isPending } = useSubscription(); + const isPro = subscriptionStatus?.isSubscribed ?? false; + + if (isPending || isPro) { + return null; + } + return (
- - Beta - - Try the new AI Theme Editor + Upgrade to Pro for unlimited requests diff --git a/components/get-pro-cta.tsx b/components/get-pro-cta.tsx index 986ab8be..0db24219 100644 --- a/components/get-pro-cta.tsx +++ b/components/get-pro-cta.tsx @@ -10,11 +10,11 @@ import Link from "next/link"; interface GetProCTAProps extends React.ComponentProps {} export function GetProCTA({ className, ...props }: GetProCTAProps) { - const { data: session } = authClient.useSession(); + const { isPending: isSessionPending } = authClient.useSession(); const { subscriptionStatus, isPending } = useSubscription(); const isPro = subscriptionStatus?.isSubscribed ?? false; - if (isPending || isPro || !session?.user) { + if (isPending || isSessionPending || isPro) { return null; } diff --git a/components/home/ai-generation-cta.tsx b/components/home/ai-generation-cta.tsx index 6a6d45cc..a0169350 100644 --- a/components/home/ai-generation-cta.tsx +++ b/components/home/ai-generation-cta.tsx @@ -44,16 +44,25 @@ export function AIGenerationCTA() {

-
- + + + + + +
diff --git a/components/home/header.tsx b/components/home/header.tsx index b3f6924e..a2d889ba 100644 --- a/components/home/header.tsx +++ b/components/home/header.tsx @@ -17,6 +17,29 @@ interface HeaderProps { setMobileMenuOpen: (open: boolean) => void; } +const navbarItems = [ + { + label: "Examples", + href: "#examples", + }, + { + label: "Features", + href: "#features", + }, + { + label: "Pricing", + href: "/pricing", + }, + { + label: "Roadmap", + href: "#roadmap", + }, + { + label: "FAQ", + href: "#faq", + }, +]; + export function Header({ isScrolled, mobileMenuOpen, setMobileMenuOpen }: HeaderProps) { const { stargazersCount } = useGithubStars("jnsahaj", "tweakcn"); @@ -46,17 +69,17 @@ export function Header({ isScrolled, mobileMenuOpen, setMobileMenuOpen }: Header