Skip to content

Commit a9c8baf

Browse files
authored
Merge pull request #1682 from session-foundation/fix/pro_custom_renew_cta_overrides
fix: add special cases for custom renew cta overrides
2 parents 35b538c + 7fe54fe commit a9c8baf

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

‎ts/components/dialog/user-settings/pages/user-pro/ProSettingsPage.tsx‎

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -978,7 +978,7 @@ function PageHero({ state }: SectionProps) {
978978
title: { token: 'proStatusError' },
979979
description: {
980980
token:
981-
isPro || proExpired
981+
isPro || (proExpired && !state.fromCTA)
982982
? 'proStatusRefreshNetworkError'
983983
: 'proStatusNetworkErrorContinue',
984984
},
@@ -999,14 +999,17 @@ function PageHero({ state }: SectionProps) {
999999
: {
10001000
title: { token: 'checkingProStatus' },
10011001
description: {
1002-
token: proExpired ? 'checkingProStatusDescription' : 'checkingProStatusContinue',
1002+
token:
1003+
proExpired && !state.fromCTA
1004+
? 'checkingProStatusDescription'
1005+
: 'checkingProStatusContinue',
10031006
},
10041007
}
10051008
)
10061009
);
10071010
}
10081011
// Do nothing if not error or loading
1009-
}, [dispatch, isPro, proExpired, isLoading, isError, backendErrorButtons]);
1012+
}, [dispatch, isPro, proExpired, isLoading, isError, backendErrorButtons, state.fromCTA]);
10101013

10111014
const heroStatusText = useMemo(() => {
10121015
if (isError) {
@@ -1038,9 +1041,9 @@ function PageHero({ state }: SectionProps) {
10381041
onClick={handleClick}
10391042
heroStatusText={heroStatusText}
10401043
heroText={
1041-
!isPro ? (
1044+
isPro || (proExpired && !state.fromCTA) ? null : (
10421045
<Localizer token={proExpired ? 'proAccessRenewStart' : 'proFullestPotential'} />
1043-
) : null
1046+
)
10441047
}
10451048
isError={isError}
10461049
noColors={proExpired && !state.fromCTA}

0 commit comments

Comments
 (0)