@@ -266,6 +266,13 @@ export function SessionProInfoModal(props: SessionProInfoState) {
266
266
}
267
267
const isGroupCta = props . variant === SessionProInfoVariant . GROUP_ACTIVATED ;
268
268
269
+ /**
270
+ * Note: the group activated cta is quite custom, but whatever the pro status of the current pro user,
271
+ * we do not want to show the CTA for "subscribe to pro".
272
+ * An admin have subscribed and that's all that's needed to make this group a Pro group.
273
+ */
274
+ const hasNoProAndNotGroupCta = ! hasPro && ! isGroupCta ;
275
+
269
276
return (
270
277
< SessionWrapperModal
271
278
onClose = { onClose }
@@ -283,14 +290,14 @@ export function SessionProInfoModal(props: SessionProInfoState) {
283
290
display : 'grid' ,
284
291
alignItems : 'center' ,
285
292
justifyItems : 'center' ,
286
- gridTemplateColumns : hasPro ? '1fr' : '1fr 1fr' ,
293
+ gridTemplateColumns : ! hasNoProAndNotGroupCta ? '1fr' : '1fr 1fr' ,
287
294
columnGap : 'var(--margins-sm)' ,
288
295
paddingInline : 'var(--margins-md)' ,
289
296
marginBottom : 'var(--margins-md)' ,
290
297
height : 'unset' ,
291
298
} }
292
299
>
293
- { ! hasPro ? (
300
+ { hasNoProAndNotGroupCta ? (
294
301
< SessionButtonShiny
295
302
{ ...buttonProps }
296
303
shinyContainerStyle = { {
@@ -308,24 +315,26 @@ export function SessionProInfoModal(props: SessionProInfoState) {
308
315
buttonColor = { SessionButtonColor . Tertiary }
309
316
onClick = { onClose }
310
317
dataTestId = "modal-session-pro-cancel-button"
311
- style = { hasPro ? { ...buttonProps . style , width : '50%' } : buttonProps . style }
318
+ style = {
319
+ ! hasNoProAndNotGroupCta ? { ...buttonProps . style , width : '50%' } : buttonProps . style
320
+ }
312
321
>
313
- { tr ( hasPro ? 'close' : 'cancel' ) }
322
+ { tr ( ! hasNoProAndNotGroupCta ? 'close' : 'cancel' ) }
314
323
</ SessionButton >
315
324
</ ModalActionsContainer >
316
325
}
317
326
>
318
327
< SpacerSM />
319
- < StyledCTATitle reverseDirection = { hasPro } >
320
- { tr ( hasPro ? ( isGroupCta ? 'proGroupActivated' : 'proActivated' ) : 'upgradeTo' ) }
328
+ < StyledCTATitle reverseDirection = { ! hasNoProAndNotGroupCta } >
329
+ { tr ( isGroupCta ? 'proGroupActivated' : hasPro ? 'proActivated' : 'upgradeTo' ) }
321
330
< ProIconButton iconSize = { 'huge' } dataTestId = "invalid-data-testid" onClick = { undefined } />
322
331
</ StyledCTATitle >
323
332
< SpacerXL />
324
333
< StyledContentContainer >
325
334
< StyledScrollDescriptionContainer >
326
335
{ getDescription ( props . variant ) }
327
336
</ StyledScrollDescriptionContainer >
328
- { ! hasPro ? (
337
+ { hasNoProAndNotGroupCta ? (
329
338
< StyledFeatureList >
330
339
{ getFeatureList ( props . variant ) . map ( token => (
331
340
< FeatureListItem > { tr ( token ) } </ FeatureListItem >
0 commit comments