UI Library for Design Engineers. Animated components and effects you can copy and paste into your apps. Free. Open Source.
🐛 fix: update env var usage
Dillion Verma86be809f9b0f
diff --git a/components/preorder.tsx b/components/preorder.tsxindex e64a4073..cd177e35 100644--- a/components/preorder.tsx+++ b/components/preorder.tsx@@ -2,6 +2,7 @@import { PriceCard } from "@/components/price-card";import { plans } from "@/config/pricing";+import { env } from "@/env.mjs";import { MagicContainer } from "@/registry/components/magicui/magic-card";import { useSession } from "next-auth/react";@@ -9,7 +10,7 @@ export default function PreOrder() {const { data: session, status } = useSession();const user = session?.user;- const url = new URL(process.env.NEXT_PUBLIC_STRIPE_PAYMENT_LINK as string);+ const url = new URL(env.NEXT_PUBLIC_STRIPE_PAYMENT_LINK);if (status === "authenticated" && user && user.email) {url.searchParams.append("prefilled_email", user.email);diff --git a/components/price-card.tsx b/components/price-card.tsxindex 4699d71d..4940354a 100644--- a/components/price-card.tsx+++ b/components/price-card.tsx@@ -12,7 +12,7 @@ import Link from "next/link";const RegularButton = () => (<Link- href={env.NEXT_PUBLIC_STRIPE_PAYMENT_LINK as string}+ href={env.NEXT_PUBLIC_STRIPE_PAYMENT_LINK}target="_blank"className={cn(buttonVariants({ variant: "default", size: "lg" }),@@ -25,7 +25,7 @@ const RegularButton = () => (const ApplePayButton = () => (<Link- href={env.NEXT_PUBLIC_STRIPE_PAYMENT_LINK as string}+ href={env.NEXT_PUBLIC_STRIPE_PAYMENT_LINK}target="_blank"className={cn(buttonVariants({ variant: "default", size: "lg" }),diff --git a/components/site-header.tsx b/components/site-header.tsxindex c0620512..b2fffb2d 100644--- a/components/site-header.tsx+++ b/components/site-header.tsx@@ -89,7 +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={env.NEXT_PUBLIC_STRIPE_PAYMENT_LINK as string}+ href={env.NEXT_PUBLIC_STRIPE_PAYMENT_LINK}><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" /> */}