Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
vraja-pro committed Dec 13, 2024
1 parent 342c1de commit ebd11ac
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ ReadabilityAnalysis.defaultProps = {
shouldUpsell: false,
shouldUpsellHighlighting: false,
isAiFeatureEnabled: false,
isElementor: false,
};

export default withSelect( select => {
Expand Down
5 changes: 3 additions & 2 deletions packages/js/src/components/contentAnalysis/SeoAnalysis.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { withSelect } from "@wordpress/data";
import { Component, Fragment } from "@wordpress/element";
import { __, sprintf } from "@wordpress/i18n";
import { addQueryArgs } from "@wordpress/url";
import { get } from "lodash";
import { LocationConsumer, RootContext } from "@yoast/externals/contexts";
import PropTypes from "prop-types";
import styled from "styled-components";
Expand Down Expand Up @@ -307,6 +306,7 @@ SeoAnalysis.propTypes = {
shouldUpsellHighlighting: PropTypes.bool,
isElementor: PropTypes.bool,
isAiFeatureEnabled: PropTypes.bool,
isPremium: PropTypes.bool,
};

SeoAnalysis.defaultProps = {
Expand All @@ -319,6 +319,7 @@ SeoAnalysis.defaultProps = {
shouldUpsellHighlighting: false,
isElementor: false,
isAiFeatureEnabled: false,
isPremium: false,
};

export default withSelect( ( select, ownProps ) => {
Expand All @@ -328,7 +329,7 @@ export default withSelect( ( select, ownProps ) => {
getResultsForKeyword,
getIsElementorEditor,
getIsPremium,
getIsAiFeatureEnabled
getIsAiFeatureEnabled,
} = select( "yoast-seo/editor" );

const keyword = getFocusKeyphrase();
Expand Down
6 changes: 3 additions & 3 deletions packages/js/src/redux/selectors/preferences.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ export const getIsWooSeoUpsellTerm = ( state ) => {
};

/**
* @deprecated This function is deprecated and will be removed in future versions.
* @deprecated This function is deprecated and will be removed in future versions.
* Please use the getIsAiFeatureEnabled from yoast-seo-premium store instead.
*
*
* @returns {boolean} Whether the AI feature is enabled.
*/
export const getIsAiFeatureEnabled = () => {
const getIsAiFeatureEnabledFromPremium = select("yoast-seo-premium/editor")?.getIsAiFeatureEnabled;
const getIsAiFeatureEnabledFromPremium = select( "yoast-seo-premium/editor" )?.getIsAiFeatureEnabled;
return getIsAiFeatureEnabledFromPremium ? getIsAiFeatureEnabledFromPremium() : Boolean( window.wpseoAdminL10n.isAiFeatureActive );
};

0 comments on commit ebd11ac

Please sign in to comment.