UI Library for Design Engineers. Animated components and effects you can copy and paste into your apps. Free. Open Source.
feat: send pricing scarcity
Dillion Verma4ea8434a0766
diff --git a/components/price-card.tsx b/components/price-card.tsxindex cf2abd55..646f4695 100644--- a/components/price-card.tsx+++ b/components/price-card.tsx@@ -40,7 +40,7 @@ export const PriceCard = ({${item.discountPrice}</span>{item.isDiscounted && (- <span className="text-4xl font-bold text-gray-600 line-through dark:text-gray-400">+ <span className="text-4xl font-bold text-gray-500 line-through dark:text-gray-500">${item.price}</span>)}diff --git a/components/pricing/pricing.tsx b/components/pricing/pricing.tsxindex 66009625..9a9a4c7b 100644--- a/components/pricing/pricing.tsx+++ b/components/pricing/pricing.tsx@@ -1,9 +1,17 @@import { PriceCard } from "@/components/price-card";import { plans } from "@/config/pricing";+import { db } from "@/lib/db";import FadeIn from "@/registry/components/magicui/fade-in";import { MagicContainer } from "@/registry/components/magicui/magic-card";+import { Gift } from "lucide-react";++export default async function Hero() {+ const payments = await db.payment.count({+ where: {+ status: "succeeded",+ },+ });-export default function Pricing() {return (<section id="pricing" className="py-14"><div className="mx-auto max-w-screen-xl px-4 md:px-8">@@ -27,9 +35,25 @@ export default function Pricing() {</FadeIn></div>- <MagicContainer className="mx-auto mt-16 grid w-full max-w-screen-md justify-center gap-8 lg:grid-cols-2">+ <div className="mx-auto my-8 inline-flex w-full items-center justify-center gap-2">+ <Gift className="h-4 w-4 animate-bounce" />+ <span>+ <strong>+ $50 off for the first {Math.ceil(payments / 100) * 100}+ </strong>{" "}+ customers (+ {payments > 0 ? Math.ceil(payments / 100) * 100 - payments : 0}{" "}+ left)+ </span>+ </div>++ <MagicContainer className="mx-auto grid w-full max-w-screen-md justify-center gap-8 lg:grid-cols-1">{plans.map((item, idx) => (- <PriceCard key={idx} item={item} className="h-fit max-w-[400px]" />+ <PriceCard+ key={idx}+ item={item}+ className="mx-auto h-fit max-w-[400px]"+ />))}</MagicContainer></div>diff --git a/config/pricing.tsx b/config/pricing.tsxindex c7fb6197..7e700c11 100644--- a/config/pricing.tsx+++ b/config/pricing.tsx@@ -1,5 +1,5 @@import { env } from "@/env.mjs";-import { User2Icon, Users2Icon } from "lucide-react";+import { User2Icon } from "lucide-react";export const plans = [{@@ -9,14 +9,14 @@ export const plans = [sub: "For individual developers and freelancers.",desc: "Beautifully crafted React + Tailwind CSS + Framer Motion components and templates for your next web project.",discountPrice: 79,- isDiscounted: false,+ isDiscounted: true,price: 129,isMostPop: true,- // banner: "$30 off",+ banner: "$50 off",href: env.NEXT_PUBLIC_STRIPE_PAYMENT_LINK,featureHeader: "What's included:",features: [- "100+ components (coming soon)",+ "100+ components","50+ building blocks (coming soon)","5+ full templates (coming soon)","Dark mode support",@@ -26,19 +26,19 @@ export const plans = ["Single developer license",],},- {- Icon: (- <Users2Icon className="flex h-10 w-10 rounded-full stroke-white/40" />- ),- name: "Teams",- sub: "For product teams, agencies and startups.",- desc: "Beautifully crafted React + Tailwind CSS + Framer Motion components and templates for your next web project.",- discountPrice: 349,- price: 499,- isMostPop: false,- banner: "30% off",- href: "https://buy.stripe.com/eVabLTafO5nE4JWbIN?prefilled_promo_code=EARLYBIRDTEAM",- featureHeader: "Everything in Personal, plus:",- features: ["10 developer licenses"],- },+ // {+ // Icon: (+ // <Users2Icon className="flex h-10 w-10 rounded-full stroke-white/40" />+ // ),+ // name: "Teams",+ // sub: "For product teams, agencies and startups.",+ // desc: "Beautifully crafted React + Tailwind CSS + Framer Motion components and templates for your next web project.",+ // discountPrice: 349,+ // price: 499,+ // isMostPop: false,+ // banner: "30% off",+ // href: "https://buy.stripe.com/eVabLTafO5nE4JWbIN?prefilled_promo_code=EARLYBIRDTEAM",+ // featureHeader: "Everything in Personal, plus:",+ // features: ["10 developer licenses"],+ // },];