Skip to content

UI Library for Design Engineers. Animated components and effects you can copy and paste into your apps. Free. Open Source.

🐛 fix: update payment link

Dillion Verma3a1f822f3174
diff --git a/components/preorder.tsx b/components/preorder.tsx
index d4a10aa9..e64a4073 100644
--- a/components/preorder.tsx
+++ b/components/preorder.tsx
@@ -9,11 +9,7 @@ export default function PreOrder() {
const { data: session, status } = useSession();
const user = session?.user;
- const url = new URL(
- process.env.NODE_ENV === "development"
- ? "https://buy.stripe.com/test_bIY7uvbbzecfcw09AB"
- : "https://buy.stripe.com/00g7vD4Vu8zQb8k5kl?prefilled_promo_code=EARLYBIRD",
- );
+ const url = new URL(process.env.NEXT_PUBLIC_STRIPE_PAYMENT_LINK as string);
if (status === "authenticated" && user && user.email) {
url.searchParams.append("prefilled_email", user.email);
diff --git a/components/price-card.tsx b/components/price-card.tsx
index f6c0775f..4699d71d 100644
--- a/components/price-card.tsx
+++ b/components/price-card.tsx
@@ -2,6 +2,7 @@
import { Icons } from "@/components/icons";
import { buttonVariants } from "@/components/ui/button";
+import { env } from "@/env.mjs";
import { cn, hasApplePay } from "@/lib/utils";
import DotPattern from "@/registry/components/magicui/dot-pattern";
import FadeIn from "@/registry/components/magicui/fade-in";
@@ -11,7 +12,7 @@ import Link from "next/link";
const RegularButton = () => (
<Link
- href="https://buy.stripe.com/00g7vD4Vu8zQb8k5kl?prefilled_promo_code=EARLYBIRD"
+ href={env.NEXT_PUBLIC_STRIPE_PAYMENT_LINK as string}
target="_blank"
className={cn(
buttonVariants({ variant: "default", size: "lg" }),
@@ -24,7 +25,7 @@ const RegularButton = () => (
const ApplePayButton = () => (
<Link
- href="https://buy.stripe.com/00g7vD4Vu8zQb8k5kl?prefilled_promo_code=EARLYBIRD"
+ href={env.NEXT_PUBLIC_STRIPE_PAYMENT_LINK as string}
target="_blank"
className={cn(
buttonVariants({ variant: "default", size: "lg" }),
diff --git a/components/site-header.tsx b/components/site-header.tsx
index bf6f6689..c0620512 100644
--- a/components/site-header.tsx
+++ b/components/site-header.tsx
@@ -6,6 +6,7 @@ import { ModeToggle } from "@/components/mode-toggle";
import { buttonVariants } from "@/components/ui/button";
import { UserAccountNav } from "@/components/user-account-nav";
import { siteConfig } from "@/config/site";
+import { env } from "@/env.mjs";
import { cn } from "@/lib/utils";
import { User } from "next-auth";
import Link from "next/link";
@@ -88,9 +89,7 @@ export function SiteHeader({ user }: SiteHeaderProps) {
"hidden gap-2 whitespace-pre md:flex",
"group relative w-full max-w-fit justify-center gap-2 overflow-hidden rounded-sm transition-all duration-300 ease-out hover:ring-2 hover:ring-primary hover:ring-offset-2",
)}
- href={
- "https://buy.stripe.com/00g7vD4Vu8zQb8k5kl?prefilled_promo_code=EARLYBIRD"
- }
+ href={env.NEXT_PUBLIC_STRIPE_PAYMENT_LINK as string}
>
<span className="absolute right-0 -mt-12 h-32 w-8 translate-x-12 rotate-12 transform bg-white opacity-10 transition-all duration-1000 ease-out group-hover:-translate-x-24 dark:bg-black" />
{/* <Icons.logo className="h-4 w-4" /> */}
diff --git a/config/pricing.ts b/config/pricing.ts
index d7780484..2c523ea2 100644
--- a/config/pricing.ts
+++ b/config/pricing.ts
@@ -2,7 +2,7 @@ export const plans = [
{
name: "Magic UI Personal",
desc: "Beautifully crafted React + Tailwind CSS + Framer Motion components and templates for your next web project.",
- discountPrice: 59,
+ discountPrice: 79,
price: 149,
isMostPop: false,
features: [
diff --git a/env.mjs b/env.mjs
index 910f1761..13ebf172 100644
--- a/env.mjs
+++ b/env.mjs
@@ -24,6 +24,7 @@ export const env = createEnv({
},
client: {
NEXT_PUBLIC_APP_URL: z.string().min(1),
+ NEXT_PUBLIC_STRIPE_PAYMENT_LINK: z.string().min(1),
},
runtimeEnv: {
NEXTAUTH_URL: process.env.NEXTAUTH_URL,
@@ -43,5 +44,7 @@ export const env = createEnv({
// STRIPE_WEBHOOK_SECRET: process.env.STRIPE_WEBHOOK_SECRET,
// STRIPE_PRO_MONTHLY_PLAN_ID: process.env.STRIPE_PRO_MONTHLY_PLAN_ID,
NEXT_PUBLIC_APP_URL: process.env.NEXT_PUBLIC_APP_URL,
+ NEXT_PUBLIC_STRIPE_PAYMENT_LINK:
+ process.env.NEXT_PUBLIC_STRIPE_PAYMENT_LINK,
},
});
diff --git a/package.json b/package.json
index 87bc387a..4c86b84c 100644
--- a/package.json
+++ b/package.json
@@ -56,7 +56,7 @@
"@react-email/section": "^0.0.9",
"@react-email/tailwind": "0.0.8",
"@react-email/text": "0.0.5",
- "@t3-oss/env-nextjs": "^0.4.1",
+ "@t3-oss/env-nextjs": "^0.7.1",
"autoprefixer": "10.4.14",
"class-variance-authority": "^0.6.0",
"clsx": "^2.0.0",
diff --git a/yarn.lock b/yarn.lock
index f91b078d..c1931175 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1847,17 +1847,17 @@
dependencies:
tslib "^2.4.0"
-"@t3-oss/[email protected]":
- version "0.4.1"
- resolved "https://registry.yarnpkg.com/@t3-oss/env-core/-/env-core-0.4.1.tgz#3f863904c5647679c52400df3c79653c994a4cbc"
- integrity sha512-JZI8vxlHwtiZO7OYS3qSX9Ngt7UcdqsugLwhBwx7UVi5wp1PtRo2tzMyNoBEGbfHdmkd2QU9IbvYjqtaLUA7TQ==
+"@t3-oss/[email protected]":
+ version "0.7.1"
+ resolved "https://registry.yarnpkg.com/@t3-oss/env-core/-/env-core-0.7.1.tgz#5e0568203d539bb2a35c96f02d33b6e204a194e5"
+ integrity sha512-3+SQt39OlmSaRLqYVFv8uRm1BpFepM5TIiMytRqO9cjH+wB77o6BIJdeyM5h5U4qLBMEzOJWCY4MBaU/rLwbYw==
-"@t3-oss/env-nextjs@^0.4.1":
- version "0.4.1"
- resolved "https://registry.yarnpkg.com/@t3-oss/env-nextjs/-/env-nextjs-0.4.1.tgz#06fc6c67c2e38eb8fcf145b3eda468c62ba34373"
- integrity sha512-lDbewJvZwOW7bFwHzdKtAH4+YcVTvGU7UEJfHwlb1RqVe9ejPrKn6ax2OGv/nFji1JXGKecKYHz3Xkpru6TFbw==
+"@t3-oss/env-nextjs@^0.7.1":
+ version "0.7.1"
+ resolved "https://registry.yarnpkg.com/@t3-oss/env-nextjs/-/env-nextjs-0.7.1.tgz#556a49382d22c190e5f9900e703679107cac483e"
+ integrity sha512-tQDbNLGCOvKGi+JoGuJ/CJInJI7/kLWJqtgGppAKS7ZFLdVOqZYR/uRjxlXOWPnxmUKF8VswOAsq7fXUpNZDhA==
dependencies:
- "@t3-oss/env-core" "0.4.1"
+ "@t3-oss/env-core" "0.7.1"
"@tailwindcss/typography@^0.5.9":
version "0.5.10"