File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed
dotcom-rendering/src/layouts Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -136,8 +136,14 @@ export const FrontLayout = ({ front, NAV }: Props) => {
136
136
137
137
const { absoluteServerTimes = false } = front . config . switches ;
138
138
139
- const isInOpinionNoAvatarVariant =
140
- abTests . opinionNoAvatarVariant === 'variant' && front . isNetworkFront ;
139
+ /**
140
+ * We are running an AB test which replaces the avatar for the card image
141
+ * in the Opinion and More opinion collections on network fronts.
142
+ */
143
+ const isInOpinionNoAvatarVariant = ( collectionName : string ) =>
144
+ abTests . opinionNoAvatarVariant === 'variant' &&
145
+ front . isNetworkFront &&
146
+ ( collectionName === 'Opinion' || collectionName === 'More opinion' ) ;
141
147
142
148
const fallbackAspectRatio = ( collectionType : DCRContainerType ) => {
143
149
switch ( collectionType ) {
@@ -637,12 +643,9 @@ export const FrontLayout = ({ front, NAV }: Props) => {
637
643
sectionId = { ophanName }
638
644
collectionId = { index + 1 }
639
645
containerLevel = { collection . containerLevel }
640
- isInOpinionNoAvatarVariant = {
641
- ( collection . displayName === 'Opinion' ||
642
- collection . displayName ===
643
- 'More opinion' ) &&
644
- isInOpinionNoAvatarVariant
645
- }
646
+ isInOpinionNoAvatarVariant = { isInOpinionNoAvatarVariant (
647
+ collection . displayName ,
648
+ ) }
646
649
/>
647
650
</ FrontSection >
648
651
You can’t perform that action at this time.
0 commit comments