From 3ceb2c8a131944470e8f238a09f4fceff93f8e6a Mon Sep 17 00:00:00 2001 From: OGBONNA SUNDAY <62995161+OgDev-01@users.noreply.github.com> Date: Wed, 23 Aug 2023 01:02:39 +0100 Subject: [PATCH] feat: add subscription management section to user settings (#1587) --- .env | 1 + components/atoms/Button/button.tsx | 2 ++ .../UserSettingsPage/user-settings-page.tsx | 28 +++++++++++++++++-- 3 files changed, 28 insertions(+), 3 deletions(-) diff --git a/.env b/.env index cef85d2fa2..b8a07c2ebd 100644 --- a/.env +++ b/.env @@ -4,5 +4,6 @@ NEXT_PUBLIC_API_URL=https://beta.api.opensauced.pizza/v1 NEXT_PUBLIC_POSTHOG_ID=phc_Y0xz6nK55MEwWjobJsI2P8rsiomZJ6eZLoXehmMy9tt NEXT_PUBLIC_CLOUD_NAME=dgxgziswe NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=test +NEXT_PUBLIC_STRIPE_SUB_CANCEL_URL=https://billing.stripe.com/p/login/test_bIY8xy3iy6fpeHu3cc NEXT_PUBLIC_OPENGRAPH_URL=https://beta.opengraph.opensauced.pizza/v1 SENTRY_DSN=https://3f5bb9023ff0407299dd22a6454558f9@o4504872488927232.ingest.sentry.io/4505082236960768 diff --git a/components/atoms/Button/button.tsx b/components/atoms/Button/button.tsx index 188693b693..51ec41355b 100644 --- a/components/atoms/Button/button.tsx +++ b/components/atoms/Button/button.tsx @@ -5,6 +5,8 @@ export interface ButtonsProps extends React.ButtonHTMLAttributes { name="linkedin_url" /> { Update Preferences - {!hasReports && ( -
+ {!hasReports ? ( +
@@ -383,6 +383,28 @@ const UserSettingsPage = ({ user }: userSettingsPageProps) => {
+ ) : ( +
+
+
+ +
+ + You are currently subscribed to the Pro plan and currently have access to all premium features. + +
+
+ +
+
)}