Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show CSAT survey only to active Plus subscribers (MNTOR-3191) #4516

Merged
merged 6 commits into from
May 13, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -189,7 +190,7 @@ export const View = (props: Props) => {
isPremiumBrokerRemovalEnabled={props.enabledFeatureFlags.includes(
"PremiumBrokerRemoval",
)}
isPremiumUser={hasPremium(props.user)}
isPremiumUser={isPlusUser}
rhelmer marked this conversation as resolved.
Show resolved Hide resolved
isEligibleForPremium={props.isEligibleForPremium}
resolutionCta={
<Button
Expand Down Expand Up @@ -404,6 +405,7 @@ export const View = (props: Props) => {
};

const showCsatSurvey =
isPlusUser &&
rhelmer marked this conversation as resolved.
Show resolved Hide resolved
props.enabledFeatureFlags.includes("CsatSurvey") &&
selectedTab === "fixed" &&
typeof props.elapsedTimeInDaysSinceInitialScan !== "undefined";
Expand Down Expand Up @@ -448,7 +450,7 @@ export const View = (props: Props) => {
<DashboardTopBanner
tabType={selectedTab}
scanInProgress={initialScanInProgress}
isPremiumUser={hasPremium(props.user)}
isPremiumUser={isPlusUser}
isEligibleForPremium={canSubscribeToPremium({
user: props.user,
countryCode,
Expand Down
Loading