diff --git a/assets/js/modules/adsense/components/common/AdBlockerWarning.js b/assets/js/components/notifications/AdBlockerWarning.js
similarity index 62%
rename from assets/js/modules/adsense/components/common/AdBlockerWarning.js
rename to assets/js/components/notifications/AdBlockerWarning.js
index fa164c0407c..63dda468a21 100644
--- a/assets/js/modules/adsense/components/common/AdBlockerWarning.js
+++ b/assets/js/components/notifications/AdBlockerWarning.js
@@ -16,23 +16,30 @@
* limitations under the License.
*/
+/**
+ * External dependencies
+ */
+import PropTypes from 'prop-types';
+
/**
* Internal dependencies
*/
import Data from 'googlesitekit-data';
-
-import { MODULES_ADSENSE } from '../../datastore/constants';
-import { CORE_SITE } from '../../../../googlesitekit/datastore/site/constants';
-import AdBlockerWarningMessage from '../../../../components/AdBlockerWarningMessage';
+import { CORE_SITE } from '../../googlesitekit/datastore/site/constants';
+import { CORE_MODULES } from '../../googlesitekit/modules/datastore/constants';
+import AdBlockerWarningMessage from './AdBlockerWarningMessage';
const { useSelect } = Data;
-export default function AdBlockerWarning() {
+export default function AdBlockerWarning( { moduleSlug } ) {
+ const storeName = useSelect( ( select ) =>
+ select( CORE_MODULES ).getModuleStoreName( moduleSlug )
+ );
const adBlockerWarningMessage = useSelect( ( select ) =>
- select( MODULES_ADSENSE ).getAdBlockerWarningMessage()
+ select( storeName )?.getAdBlockerWarningMessage()
);
const getHelpLink = useSelect( ( select ) =>
select( CORE_SITE ).getDocumentationLinkURL(
- 'adsense-ad-blocker-detected'
+ `${ moduleSlug }-ad-blocker-detected`
)
);
@@ -43,3 +50,7 @@ export default function AdBlockerWarning() {
/>
);
}
+
+AdBlockerWarning.propTypes = {
+ moduleSlug: PropTypes.string.isRequired,
+};
diff --git a/assets/js/modules/adsense/components/common/AdBlockerWarning.test.js b/assets/js/components/notifications/AdBlockerWarning.test.js
similarity index 70%
rename from assets/js/modules/adsense/components/common/AdBlockerWarning.test.js
rename to assets/js/components/notifications/AdBlockerWarning.test.js
index dd42fbbf6cf..5a9cfb471e7 100644
--- a/assets/js/modules/adsense/components/common/AdBlockerWarning.test.js
+++ b/assets/js/components/notifications/AdBlockerWarning.test.js
@@ -20,10 +20,13 @@
* Internal dependencies
*/
import AdBlockerWarning from './AdBlockerWarning';
-import { render } from '../../../../../../tests/js/test-utils';
-import { MODULES_ADSENSE } from '../../datastore/constants';
-import { CORE_USER } from '../../../../googlesitekit/datastore/user/constants';
-import { provideModules } from '../../../../../../tests/js/utils';
+import { render } from '../../../../tests/js/test-utils';
+import { MODULES_ADSENSE } from '../../modules/adsense/datastore/constants';
+import { CORE_USER } from '../../googlesitekit/datastore/user/constants';
+import {
+ provideModules,
+ provideModuleRegistrations,
+} from '../../../../tests/js/utils';
const setupAdBlockerNotConnectedRegistry = ( registry ) => {
provideModules( registry, [
@@ -33,6 +36,7 @@ const setupAdBlockerNotConnectedRegistry = ( registry ) => {
connected: false,
},
] );
+ provideModuleRegistrations( registry );
registry.dispatch( MODULES_ADSENSE ).receiveGetSettings( {} );
registry.dispatch( CORE_USER ).receiveIsAdBlockerActive( true );
};
@@ -45,20 +49,32 @@ const setupAdBlockerConnectedRegistry = ( registry ) => {
connected: true,
},
] );
+ provideModuleRegistrations( registry );
registry.dispatch( MODULES_ADSENSE ).receiveGetSettings( {} );
registry.dispatch( CORE_USER ).receiveIsAdBlockerActive( true );
};
const setupNoAdBlockerRegistry = ( registry ) => {
+ provideModules( registry, [
+ {
+ slug: 'adsense',
+ active: true,
+ connected: true,
+ },
+ ] );
+ provideModuleRegistrations( registry );
registry.dispatch( MODULES_ADSENSE ).receiveGetSettings( {} );
registry.dispatch( CORE_USER ).receiveIsAdBlockerActive( false );
};
describe( 'AdBlockerWarning', () => {
it( 'should render the warning when an AdBlocker is active and module is not connected', () => {
- const { container } = render( , {
- setupRegistry: setupAdBlockerNotConnectedRegistry,
- } );
+ const { container } = render(
+ ,
+ {
+ setupRegistry: setupAdBlockerNotConnectedRegistry,
+ }
+ );
expect(
container.querySelector( '.googlesitekit-warning-notice' )
@@ -68,9 +84,12 @@ describe( 'AdBlockerWarning', () => {
} );
it( 'should render the warning when an AdBlocker is active and module is connected', () => {
- const { container } = render( , {
- setupRegistry: setupAdBlockerConnectedRegistry,
- } );
+ const { container } = render(
+ ,
+ {
+ setupRegistry: setupAdBlockerConnectedRegistry,
+ }
+ );
expect(
container.querySelector( '.googlesitekit-warning-notice' )
@@ -80,9 +99,12 @@ describe( 'AdBlockerWarning', () => {
} );
it( 'should render nothing when no AdBlocker is active', () => {
- const { container } = render( , {
- setupRegistry: setupNoAdBlockerRegistry,
- } );
+ const { container } = render(
+ ,
+ {
+ setupRegistry: setupNoAdBlockerRegistry,
+ }
+ );
expect( container.firstChild ).toEqual( null );
} );
diff --git a/assets/js/components/AdBlockerWarningMessage.js b/assets/js/components/notifications/AdBlockerWarningMessage.js
similarity index 92%
rename from assets/js/components/AdBlockerWarningMessage.js
rename to assets/js/components/notifications/AdBlockerWarningMessage.js
index b5bc61bc842..43104998fb1 100644
--- a/assets/js/components/AdBlockerWarningMessage.js
+++ b/assets/js/components/notifications/AdBlockerWarningMessage.js
@@ -30,9 +30,9 @@ import { createInterpolateElement } from '@wordpress/element';
/**
* Internal dependencies
*/
-import Link from './Link';
-import WarningNotice from './WarningNotice';
-import ExternalIcon from '../../svg/icons/external-rounded.svg';
+import Link from '../Link';
+import WarningNotice from '../WarningNotice';
+import ExternalIcon from '../../../svg/icons/external-rounded.svg';
export default function AdBlockerWarningMessage( {
getHelpLink = '',
diff --git a/assets/js/components/notifications/ModuleSettingsWarning.js b/assets/js/components/notifications/ModuleSettingsWarning.js
index bc5ae054fc2..a3229e66d94 100644
--- a/assets/js/components/notifications/ModuleSettingsWarning.js
+++ b/assets/js/components/notifications/ModuleSettingsWarning.js
@@ -21,13 +21,12 @@
*/
import Data from 'googlesitekit-data';
import { CORE_MODULES } from '../../googlesitekit/modules/datastore/constants';
+import { ERROR_CODE_ADBLOCKER_ACTIVE } from '../../googlesitekit/datastore/user/constants';
import WarningNotice from '../WarningNotice';
+import AdBlockerWarning from './AdBlockerWarning';
const { useSelect } = Data;
-/*
- * A single module. Keeps track of its own active state and settings.
- */
export default function ModuleSettingsWarning( { slug } ) {
const error = useSelect( ( select ) =>
select( CORE_MODULES )?.getCheckRequirementsError( slug )
@@ -37,5 +36,11 @@ export default function ModuleSettingsWarning( { slug } ) {
return null;
}
+ // The AdBlockerWarning component also renders the "Get help"
+ // documentation URL in addition to the error message.
+ if ( ERROR_CODE_ADBLOCKER_ACTIVE === error.code ) {
+ return ;
+ }
+
return { error.message } ;
}
diff --git a/assets/js/components/settings/DefaultSettingsSetupIncomplete.js b/assets/js/components/settings/DefaultSettingsSetupIncomplete.js
index 6c2d2fa846c..95ac9ef9d61 100644
--- a/assets/js/components/settings/DefaultSettingsSetupIncomplete.js
+++ b/assets/js/components/settings/DefaultSettingsSetupIncomplete.js
@@ -44,19 +44,29 @@ export default function DefaultSettingsSetupIncomplete( { slug } ) {
const adminReauthURL = useSelect( ( select ) =>
select( storeName )?.getAdminReauthURL?.()
);
+ const requirementsError = useSelect( ( select ) =>
+ select( CORE_MODULES )?.getCheckRequirementsError( slug )
+ );
return (
+
{ createInterpolateElement(
__(
'Setup incomplete: continue module setup ',
'google-site-kit'
),
{
- a: ,
+ a: (
+
+ ),
}
) }
|
diff --git a/assets/js/components/settings/SetupModule.js b/assets/js/components/settings/SetupModule.js
index fcd1fb542ac..cb65420334c 100644
--- a/assets/js/components/settings/SetupModule.js
+++ b/assets/js/components/settings/SetupModule.js
@@ -90,11 +90,7 @@ export default function SetupModule( { slug, name, description } ) {
@@ -126,8 +122,6 @@ export default function SetupModule( { slug, name, description } ) {
{ description }
-
-
+
+
);
}
diff --git a/assets/js/modules/ads/components/common/AdBlockerWarning.js b/assets/js/modules/ads/components/common/AdBlockerWarning.js
deleted file mode 100644
index c8edf2e2a60..00000000000
--- a/assets/js/modules/ads/components/common/AdBlockerWarning.js
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * Ads AdBlockerWarning component.
- *
- * Site Kit by Google, Copyright 2024 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * Internal dependencies
- */
-import Data from 'googlesitekit-data';
-
-import { MODULES_ADS } from '../../datastore/constants';
-import { CORE_SITE } from '../../../../googlesitekit/datastore/site/constants';
-import AdBlockerWarningMessage from '../../../../components/AdBlockerWarningMessage';
-const { useSelect } = Data;
-
-export default function AdBlockerWarning() {
- const adBlockerWarningMessage = useSelect( ( select ) =>
- select( MODULES_ADS ).getAdBlockerWarningMessage()
- );
- const getHelpLink = useSelect( ( select ) =>
- select( CORE_SITE ).getDocumentationLinkURL( 'ads-ad-blocker-detected' )
- );
-
- return (
-
- );
-}
diff --git a/assets/js/modules/ads/components/common/index.js b/assets/js/modules/ads/components/common/index.js
index 598411eea09..a8609cdbc13 100644
--- a/assets/js/modules/ads/components/common/index.js
+++ b/assets/js/modules/ads/components/common/index.js
@@ -16,6 +16,5 @@
* limitations under the License.
*/
-export { default as AdBlockerWarning } from './AdBlockerWarning';
export { default as ConversionIDTextField } from './ConversionIDTextField';
export { default as PAXEmbeddedApp } from './PAXEmbeddedApp';
diff --git a/assets/js/modules/ads/components/dashboard/PartnerAdsPAXWidget.js b/assets/js/modules/ads/components/dashboard/PartnerAdsPAXWidget.js
index d6e65930232..4290c495ae6 100644
--- a/assets/js/modules/ads/components/dashboard/PartnerAdsPAXWidget.js
+++ b/assets/js/modules/ads/components/dashboard/PartnerAdsPAXWidget.js
@@ -34,7 +34,7 @@ import whenActive from '../../../../util/when-active';
import whenScopesGranted from '../../../../util/whenScopesGranted';
import { ADWORDS_SCOPE, MODULES_ADS } from '../../datastore/constants';
import PAXEmbeddedApp from '../common/PAXEmbeddedApp';
-import { AdBlockerWarning } from '../common';
+import AdBlockerWarning from '../../../../components/notifications/AdBlockerWarning';
import { CORE_USER } from '../../../../googlesitekit/datastore/user/constants';
import { CORE_WIDGETS } from '../../../../googlesitekit/widgets/datastore/constants';
const { useSelect } = Data;
@@ -65,7 +65,7 @@ function PartnerAdsPAXWidget( { WidgetNull, Widget } ) {
if ( isAdblockerActive ) {
return (
-
+
);
}
diff --git a/assets/js/modules/ads/components/settings/SettingsEdit.js b/assets/js/modules/ads/components/settings/SettingsEdit.js
index c4398877aca..87431a12131 100644
--- a/assets/js/modules/ads/components/settings/SettingsEdit.js
+++ b/assets/js/modules/ads/components/settings/SettingsEdit.js
@@ -25,7 +25,7 @@ import { MODULES_ADS } from '../../datastore/constants';
import { CORE_USER } from '../../../../googlesitekit/datastore/user/constants';
import SettingsForm from './SettingsForm';
import SettingsView from './SettingsView';
-import AdBlockerWarning from '../common/AdBlockerWarning';
+import AdBlockerWarning from '../../../../components/notifications/AdBlockerWarning';
import { useFeature } from './../../../../hooks/useFeature';
const { useSelect } = Data;
@@ -50,7 +50,7 @@ export default function SettingsEdit() {
let viewComponent;
if ( isAdBlockerActive ) {
- viewComponent = ;
+ viewComponent = ;
} else if ( paxEnabled && ( paxConversionID || extCustomerID ) ) {
viewComponent = ;
} else if ( isDoingSubmitChanges ) {
diff --git a/assets/js/modules/ads/components/settings/SettingsSetupIncomplete.js b/assets/js/modules/ads/components/settings/SettingsSetupIncomplete.js
deleted file mode 100644
index a13a92cb683..00000000000
--- a/assets/js/modules/ads/components/settings/SettingsSetupIncomplete.js
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- * Ads Settings Setup Incomplete component.
- *
- * Site Kit by Google, Copyright 2024 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * WordPress dependencies
- */
-import { Fragment, createInterpolateElement } from '@wordpress/element';
-import { __ } from '@wordpress/i18n';
-
-/**
- * Internal dependencies
- */
-import Data from 'googlesitekit-data';
-import Link from '../../../../components/Link';
-import { CORE_MODULES } from '../../../../googlesitekit/modules/datastore/constants';
-import { MODULES_ADS } from '../../datastore/constants';
-import { AdBlockerWarning } from '../common';
-const { useSelect } = Data;
-
-export default function SettingsSetupIncomplete() {
- const adminReauthURL = useSelect( ( select ) =>
- select( MODULES_ADS ).getAdminReauthURL()
- );
- const requirementsError = useSelect( ( select ) =>
- select( CORE_MODULES )?.getCheckRequirementsError( 'ads' )
- );
-
- return (
-
-
-
- { createInterpolateElement(
- __(
- 'Setup incomplete: continue module setup ',
- 'google-site-kit'
- ),
- {
- a: (
-
- ),
- }
- ) }
-
- );
-}
diff --git a/assets/js/modules/ads/components/settings/SettingsView.js b/assets/js/modules/ads/components/settings/SettingsView.js
index e20faa43436..34da725fc01 100644
--- a/assets/js/modules/ads/components/settings/SettingsView.js
+++ b/assets/js/modules/ads/components/settings/SettingsView.js
@@ -29,7 +29,7 @@ import Data from 'googlesitekit-data';
import { MODULES_ADS } from '../../datastore/constants';
import { CORE_USER } from '../../../../googlesitekit/datastore/user/constants';
import DisplaySetting from '../../../../components/DisplaySetting';
-import AdBlockerWarning from '../common/AdBlockerWarning';
+import AdBlockerWarning from '../../../../components/notifications/AdBlockerWarning';
import { useFeature } from './../../../../hooks/useFeature';
const { useSelect } = Data;
@@ -59,7 +59,7 @@ export default function SettingsView() {
return (
-
+
{ ! isAdBlockerActive && (
diff --git a/assets/js/modules/ads/components/settings/index.js b/assets/js/modules/ads/components/settings/index.js
index 76f4cf8707b..0b4f85608ca 100644
--- a/assets/js/modules/ads/components/settings/index.js
+++ b/assets/js/modules/ads/components/settings/index.js
@@ -19,4 +19,3 @@
export { default as SettingsView } from './SettingsView';
export { default as SettingsForm } from './SettingsForm';
export { default as SettingsEdit } from './SettingsEdit';
-export { default as SettingsSetupIncomplete } from './SettingsSetupIncomplete';
diff --git a/assets/js/modules/ads/components/setup/SetupMain.js b/assets/js/modules/ads/components/setup/SetupMain.js
index 37f6075fed1..f78f4e690dc 100644
--- a/assets/js/modules/ads/components/setup/SetupMain.js
+++ b/assets/js/modules/ads/components/setup/SetupMain.js
@@ -34,7 +34,7 @@ import Data from 'googlesitekit-data';
import AdsIcon from '../../../../../svg/graphics/ads.svg';
import SetupForm from './SetupForm';
import SupportLink from '../../../../components/SupportLink';
-import AdBlockerWarning from '../common/AdBlockerWarning';
+import AdBlockerWarning from '../../../../components/notifications/AdBlockerWarning';
import { CORE_USER } from '../../../../googlesitekit/datastore/user/constants';
const { useSelect } = Data;
@@ -55,7 +55,7 @@ export default function SetupMain( { finishSetup } ) {
-
+
{ ! isAdBlockerActive && (
diff --git a/assets/js/modules/ads/components/setup/SetupMainPAX.js b/assets/js/modules/ads/components/setup/SetupMainPAX.js
index 85e33665d38..b2bcff93b3f 100644
--- a/assets/js/modules/ads/components/setup/SetupMainPAX.js
+++ b/assets/js/modules/ads/components/setup/SetupMainPAX.js
@@ -42,7 +42,7 @@ import { SpinnerButton } from 'googlesitekit-components';
import AdsIcon from '../../../../../svg/graphics/ads.svg';
import SetupForm from './SetupForm';
import SupportLink from '../../../../components/SupportLink';
-import AdBlockerWarning from '../common/AdBlockerWarning';
+import AdBlockerWarning from '../../../../components/notifications/AdBlockerWarning';
import { CORE_USER } from '../../../../googlesitekit/datastore/user/constants';
import { CORE_LOCATION } from '../../../../googlesitekit/datastore/location/constants';
import {
@@ -168,7 +168,7 @@ export default function SetupMainPAX( { finishSetup } ) {
-
+
{ ! isAdBlockerActive &&
PAX_SETUP_STEP.FINISHED === showPaxAppStep && (
diff --git a/assets/js/modules/ads/index.js b/assets/js/modules/ads/index.js
index e704f53000f..b9f6255b612 100644
--- a/assets/js/modules/ads/index.js
+++ b/assets/js/modules/ads/index.js
@@ -25,11 +25,7 @@ import { __ } from '@wordpress/i18n';
* Internal dependencies
*/
import AdsIcon from '../../../svg/graphics/ads.svg';
-import {
- SettingsEdit,
- SettingsView,
- SettingsSetupIncomplete,
-} from './components/settings';
+import { SettingsEdit, SettingsView } from './components/settings';
import { SetupMain, SetupMainPAX } from './components/setup';
import { MODULES_ADS } from './datastore/constants';
import {
@@ -48,7 +44,6 @@ export const registerModule = ( modules ) => {
SettingsEditComponent: SettingsEdit,
SettingsViewComponent: SettingsView,
SetupComponent: isFeatureEnabled( 'adsPax' ) ? SetupMainPAX : SetupMain,
- SettingsSetupIncompleteComponent: SettingsSetupIncomplete,
Icon: AdsIcon,
features: [
__(
diff --git a/assets/js/modules/adsense/components/common/index.js b/assets/js/modules/adsense/components/common/index.js
index c30a8486f6e..69a0fa4d718 100644
--- a/assets/js/modules/adsense/components/common/index.js
+++ b/assets/js/modules/adsense/components/common/index.js
@@ -17,7 +17,6 @@
*/
export { default as AccountSelect } from './AccountSelect';
-export { default as AdBlockerWarning } from './AdBlockerWarning';
export { default as AdSenseLinkCTA } from './AdSenseLinkCTA';
export { default as ErrorNotices } from './ErrorNotices';
export { default as UserProfile } from './UserProfile';
diff --git a/assets/js/modules/adsense/components/dashboard/AdBlockerWarningWidget.js b/assets/js/modules/adsense/components/dashboard/AdBlockerWarningWidget.js
index 12532ae5f0e..4ba23527a0b 100644
--- a/assets/js/modules/adsense/components/dashboard/AdBlockerWarningWidget.js
+++ b/assets/js/modules/adsense/components/dashboard/AdBlockerWarningWidget.js
@@ -25,7 +25,7 @@ import PropTypes from 'prop-types';
* Internal dependencies
*/
import Data from 'googlesitekit-data';
-import AdBlockerWarning from '../common/AdBlockerWarning';
+import AdBlockerWarning from '../../../../components/notifications/AdBlockerWarning';
import whenActive from '../../../../util/when-active';
import { CORE_USER } from '../../../../googlesitekit/datastore/user/constants';
const { useSelect } = Data;
@@ -41,7 +41,7 @@ function AdBlockerWarningWidget( { Widget, WidgetNull } ) {
return (
-
+
);
}
diff --git a/assets/js/modules/adsense/components/dashboard/DashboardTopEarningPagesWidgetGA4.js b/assets/js/modules/adsense/components/dashboard/DashboardTopEarningPagesWidgetGA4.js
index 497555a6c12..b73bd22584f 100644
--- a/assets/js/modules/adsense/components/dashboard/DashboardTopEarningPagesWidgetGA4.js
+++ b/assets/js/modules/adsense/components/dashboard/DashboardTopEarningPagesWidgetGA4.js
@@ -51,7 +51,8 @@ import PreviewTable from '../../../../components/PreviewTable';
import ReportTable from '../../../../components/ReportTable';
import TableOverflowContainer from '../../../../components/TableOverflowContainer';
import { ZeroDataMessage } from '../../../analytics-4/components/common';
-import { AdSenseLinkCTA, AdBlockerWarning } from '../common';
+import { AdSenseLinkCTA } from '../common';
+import AdBlockerWarning from '../../../../components/notifications/AdBlockerWarning';
const { useSelect, useInViewSelect } = Data;
@@ -200,7 +201,7 @@ function DashboardTopEarningPagesWidgetGA4( {
if ( isAdblockerActive ) {
return (
-
+
);
}
diff --git a/assets/js/modules/adsense/components/settings/SettingsSetupIncomplete.js b/assets/js/modules/adsense/components/settings/SettingsSetupIncomplete.js
index 104fdcf447e..1e309cf1b95 100644
--- a/assets/js/modules/adsense/components/settings/SettingsSetupIncomplete.js
+++ b/assets/js/modules/adsense/components/settings/SettingsSetupIncomplete.js
@@ -30,7 +30,7 @@ import Link from '../../../../components/Link';
import { CORE_MODULES } from '../../../../googlesitekit/modules/datastore/constants';
import { MODULES_ADSENSE } from '../../datastore/constants';
import { isPendingAccountStatus } from '../../util/status';
-import { AdBlockerWarning } from '../common';
+import ModuleSettingsWarning from '../../../../components/notifications/ModuleSettingsWarning';
const { useSelect } = Data;
export default function SettingsSetupIncomplete() {
@@ -62,7 +62,7 @@ export default function SettingsSetupIncomplete() {
return (
{ createInterpolateElement(
diff --git a/assets/js/modules/adsense/components/setup/SetupMain.js b/assets/js/modules/adsense/components/setup/SetupMain.js
index d1ea96d0c72..1d958ae68d7 100644
--- a/assets/js/modules/adsense/components/setup/SetupMain.js
+++ b/assets/js/modules/adsense/components/setup/SetupMain.js
@@ -38,7 +38,8 @@ import SetupAccount from './SetupAccount';
import SetupCreateAccount from './SetupCreateAccount';
import SetupSelectAccount from './SetupSelectAccount';
import { trackEvent } from '../../../../util';
-import { AdBlockerWarning, ErrorNotices } from '../common';
+import { ErrorNotices } from '../common';
+import AdBlockerWarning from '../../../../components/notifications/AdBlockerWarning';
import {
BACKGROUND_SUBMIT_SUSPENDED,
MODULES_ADSENSE,
@@ -281,7 +282,7 @@ export default function SetupMain( { finishSetup } ) {
-
+
{ ! isAdBlockerActive && viewComponent }
diff --git a/assets/sass/components/settings/_googlesitekit-settings-connect-module.scss b/assets/sass/components/settings/_googlesitekit-settings-connect-module.scss
index 215cd01d2e2..18846be22f6 100644
--- a/assets/sass/components/settings/_googlesitekit-settings-connect-module.scss
+++ b/assets/sass/components/settings/_googlesitekit-settings-connect-module.scss
@@ -77,17 +77,4 @@
letter-spacing: $ls-s;
}
}
-
- .googlesitekit-settings-connect-module--disabled {
- color: $c-disabled;
-
- .googlesitekit-settings-connect-module__logo {
- filter: saturate(0);
- opacity: 0.5;
- }
-
- .googlesitekit-settings-connect-module__title {
- color: $c-disabled;
- }
- }
}
diff --git a/stories/module-adsense.stories.js b/stories/module-adsense.stories.js
index 49cc72c4677..aab2be69b76 100644
--- a/stories/module-adsense.stories.js
+++ b/stories/module-adsense.stories.js
@@ -27,12 +27,10 @@ import { storiesOf } from '@storybook/react';
import {
AccountSelect,
UseSnippetSwitch,
- AdBlockerWarning,
UserProfile,
} from '../assets/js/modules/adsense/components/common';
import { WithTestRegistry } from '../tests/js/utils';
import * as fixtures from '../assets/js/modules/adsense/datastore/__fixtures__';
-import { CORE_USER } from '../assets/js/googlesitekit/datastore/user/constants';
import { MODULES_ADSENSE } from '../assets/js/modules/adsense/datastore/constants';
function SetupWrap( { children } ) {
@@ -112,21 +110,6 @@ storiesOf( 'AdSense Module', module )
);
} )
- .add( 'AdBlocker Warning', () => {
- const setupRegistry = ( { dispatch } ) => {
- dispatch( CORE_USER ).receiveIsAdBlockerActive( true );
- };
-
- return (
-
-
-
-
-
- );
- } )
.add( 'User Profile', () => {
const setupRegistry = () => {};