Skip to content

Commit

Permalink
implement conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
vraja-pro committed Jan 3, 2025
1 parent 38c1090 commit 65a6732
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions packages/js/src/integrations-page/recommended-integrations.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ const integrations = [
},
];

export const RecommendedIntegrations = [
const isGoogleSiteKitFeatureEnabled = get( window, "wpseoIntegrationsData.google_site_kit.featureEnabled", false );

const RecommendedIntegrations = [
integrations.map( ( integration, index ) => {
return (
<ToggleableIntegration
Expand All @@ -76,5 +78,11 @@ export const RecommendedIntegrations = [
/>
);
} ),
<GoogleSiteKitIntegration key={ integrations.length } />,
];


if( isGoogleSiteKitFeatureEnabled ) {
RecommendedIntegrations.push( <GoogleSiteKitIntegration key={ integrations.length } /> );
}

export { RecommendedIntegrations };

0 comments on commit 65a6732

Please sign in to comment.