From 92bf7a9d637ecc9daebb38bbc3434e27fb699965 Mon Sep 17 00:00:00 2001 From: Florian Zia Date: Fri, 10 May 2024 16:43:19 +0200 Subject: [PATCH 1/2] fix: Show the CSAT survey banner only to users that an active Plus subscription --- .../(authenticated)/user/(dashboard)/dashboard/View.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/app/(proper_react)/(redesign)/(authenticated)/user/(dashboard)/dashboard/View.tsx b/src/app/(proper_react)/(redesign)/(authenticated)/user/(dashboard)/dashboard/View.tsx index cd00586eb4a..3a83872729e 100644 --- a/src/app/(proper_react)/(redesign)/(authenticated)/user/(dashboard)/dashboard/View.tsx +++ b/src/app/(proper_react)/(redesign)/(authenticated)/user/(dashboard)/dashboard/View.tsx @@ -84,9 +84,10 @@ export const View = (props: Props) => { const l10n = useL10n(); const recordTelemetry = useTelemetry(props.experimentationId); const countryCode = useContext(CountryCodeContext); + const isPlusUser = hasPremium(props.user); const adjustedScanResults = props.userScanData.results.map((scanResult) => { - if (scanResult.status === "new" && hasPremium(props.user)) { + if (scanResult.status === "new" && isPlusUser) { // Even if the user has Plus, OneRep won't automatically start removing // found exposures; it first sends a request to our webhook, and then the // webhook sends an opt-out request to OneRep. Meanwhile, however, we're @@ -189,7 +190,7 @@ export const View = (props: Props) => { isPremiumBrokerRemovalEnabled={props.enabledFeatureFlags.includes( "PremiumBrokerRemoval", )} - isPremiumUser={hasPremium(props.user)} + isPremiumUser={isPlusUser} isEligibleForPremium={props.isEligibleForPremium} resolutionCta={