diff --git a/assets/wizards/advertising/views/ad-units/index.js b/assets/wizards/advertising/views/ad-units/index.js index bb84027b3f..6c0320bcbe 100644 --- a/assets/wizards/advertising/views/ad-units/index.js +++ b/assets/wizards/advertising/views/ad-units/index.js @@ -70,11 +70,11 @@ const AdUnits = ( { const isLegacy = 'legacy' === connection_mode; const isDisconnectedGAM = adUnit => { - return isLegacy && ! adUnit.is_legacy; + return ! adUnit.is_default && ! adUnit.is_legacy && isLegacy; }; const canEdit = adUnit => { - return ! isDisconnectedGAM( adUnit ); + return ! adUnit.is_default && ! isDisconnectedGAM( adUnit ); }; return ( @@ -183,11 +183,6 @@ const AdUnits = ( { { __( 'Code:', 'newspack' ) } { adUnit.code } ) : null } - { isDisconnectedGAM( adUnit ) ? ( - <> - { __( 'Disconnected from GAM.', 'newspack' ) } |{ ' ' } - - ) : null } { adUnit.sizes?.length || adUnit.fluid ? ( <> { ' ' } @@ -210,6 +205,12 @@ const AdUnits = ( { | { __( 'Default ad unit.', 'newspack' ) } ) : null } + { isDisconnectedGAM( adUnit ) ? ( + <> + { ' ' } + | { __( 'Disconnected from GAM.', 'newspack' ) } + + ) : null } ) } actionText={