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) => {
136136
137137 const contributionsServiceUrl = getContributionsServiceUrl ( front ) ;
138138
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' ) ;
141147
142148 const fallbackAspectRatio = ( collectionType : DCRContainerType ) => {
143149 switch ( collectionType ) {
@@ -637,12 +643,9 @@ export const FrontLayout = ({ front, NAV }: Props) => {
637643 sectionId = { ophanName }
638644 collectionId = { index + 1 }
639645 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+ ) }
646649 />
647650 </ FrontSection >
648651
You can’t perform that action at this time.
0 commit comments