From 81b3cc9184098d7d47b055072f20d0c2afdafe91 Mon Sep 17 00:00:00 2001 From: Shahidullah Muffakir Date: Sat, 9 Nov 2024 02:34:51 +0530 Subject: [PATCH 1/2] hide 'Request early cancellation' option until after first billing --- src/pages/settings/Subscription/CardSection/CardSection.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/settings/Subscription/CardSection/CardSection.tsx b/src/pages/settings/Subscription/CardSection/CardSection.tsx index bc074793d837..ca38d98f0b12 100644 --- a/src/pages/settings/Subscription/CardSection/CardSection.tsx +++ b/src/pages/settings/Subscription/CardSection/CardSection.tsx @@ -195,7 +195,7 @@ function CardSection() { /> )} - {privateSubscription?.type === CONST.SUBSCRIPTION.TYPE.ANNUAL && } + {privateSubscription?.type === CONST.SUBSCRIPTION.TYPE.ANNUAL && account?.hasPurchases && } {!!account?.isEligibleForRefund && ( From b2a10a05b305863ec9f583b22eb8ded0f6d54bb5 Mon Sep 17 00:00:00 2001 From: Shahidullah Muffakir Date: Sat, 9 Nov 2024 03:09:53 +0530 Subject: [PATCH 2/2] resolve eslint error --- src/pages/settings/Subscription/CardSection/CardSection.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/settings/Subscription/CardSection/CardSection.tsx b/src/pages/settings/Subscription/CardSection/CardSection.tsx index ca38d98f0b12..bf0fdcbb6da3 100644 --- a/src/pages/settings/Subscription/CardSection/CardSection.tsx +++ b/src/pages/settings/Subscription/CardSection/CardSection.tsx @@ -195,7 +195,7 @@ function CardSection() { /> )} - {privateSubscription?.type === CONST.SUBSCRIPTION.TYPE.ANNUAL && account?.hasPurchases && } + {!!(privateSubscription?.type === CONST.SUBSCRIPTION.TYPE.ANNUAL && account?.hasPurchases) && } {!!account?.isEligibleForRefund && (