From f64af79b639ba8b4f45d306216e77895f10f6e4f Mon Sep 17 00:00:00 2001 From: Hassan El Mghari Date: Thu, 23 Mar 2023 12:51:09 -0400 Subject: [PATCH] updated pricing --- components/Header.tsx | 28 +++++++++++++++++++--------- pages/api/stripe-webhook.ts | 10 +++++++--- pages/buy-credits.tsx | 7 +------ pages/dream.tsx | 13 +++++++++---- 4 files changed, 36 insertions(+), 22 deletions(-) diff --git a/components/Header.tsx b/components/Header.tsx index ec53de42..0febae46 100644 --- a/components/Header.tsx +++ b/components/Header.tsx @@ -1,7 +1,13 @@ import Image from "next/image"; import Link from "next/link"; -export default function Header({ photo }: { photo?: string }) { +export default function Header({ + photo, + email, +}: { + photo?: string; + email?: string; +}) { return (
@@ -16,7 +22,7 @@ export default function Header({ photo }: { photo?: string }) { roomGPT.io - {photo ? ( + {email ? (
- Profile picture + {photo ? ( + Profile picture + ) : ( +
+ )}
) : ( { // @ts-ignore switch (paymentIntent.amount_subtotal) { + case 500: case 1000: creditAmount = 20; break; + case 1900: case 3000: - creditAmount = 80; + creditAmount = 100; break; + case 3500: case 5000: - creditAmount = 160; + creditAmount = 250; break; + case 7000: case 10000: - creditAmount = 400; + creditAmount = 750; break; } await prisma.user.update({ diff --git a/pages/buy-credits.tsx b/pages/buy-credits.tsx index e637cdf9..ef5336cd 100644 --- a/pages/buy-credits.tsx +++ b/pages/buy-credits.tsx @@ -12,18 +12,13 @@ export default function Pricing() { const { data } = useSWR("/api/remaining", fetcher); return ( -
+
RoomGPT Pricing