Skip to content

Commit

Permalink
cleanup unused props
Browse files Browse the repository at this point in the history
  • Loading branch information
vraja-pro committed Nov 13, 2024
1 parent 4c3c87a commit 6061d8f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
14 changes: 7 additions & 7 deletions packages/js/src/components/SEMrushRelatedKeyphrasesModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ class SEMrushRelatedKeyphrasesModal extends Component {
* @returns {wp.Element} The RelatedKeyPhrasesModal modal component.
*/
render() {
const { keyphrase, location, whichModalOpen, isLoggedIn, shouldCloseOnClickOutside, onClose, countryCode, isRtl } = this.props;
const { keyphrase, location, whichModalOpen, isLoggedIn, onClose, countryCode, isRtl } = this.props;

const insightsLink = "https://www.semrush.com/analytics/keywordoverview/?q=" + encodeURIComponent( keyphrase ) +
"&db=" + encodeURIComponent( countryCode );
Expand All @@ -169,16 +169,16 @@ class SEMrushRelatedKeyphrasesModal extends Component {
{ __( "Get related keyphrases", "wordpress-seo" ) }
</NewButton>
</div> }
<Root context={{ isRtl }} >
<Root context={ { isRtl } }>
<Modal
isOpen={ keyphrase && whichModalOpen === location }
isOpen={ Boolean( keyphrase ) && whichModalOpen === location }
onClose={ onClose }
insightsLink={ insightsLink }
learnMoreLink={ "https://learnmore.semrush.com/" }
>

<Slot name="YoastRelatedKeyphrases" />

</Modal>
</Root>
{ ! isLoggedIn && <div className={ "yoast" }>
Expand Down Expand Up @@ -217,7 +217,7 @@ SEMrushRelatedKeyphrasesModal.propTypes = {
onOpenWithNoKeyphrase: PropTypes.func.isRequired,
onClose: PropTypes.func.isRequired,
onAuthentication: PropTypes.func.isRequired,
shouldCloseOnClickOutside: PropTypes.bool,
countryCode: PropTypes.string,
isRtl: PropTypes.bool,
};

Expand All @@ -226,7 +226,7 @@ SEMrushRelatedKeyphrasesModal.defaultProps = {
location: "",
whichModalOpen: "none",
isLoggedIn: false,
shouldCloseOnClickOutside: true,
countryCode: "en_US",
isRtl: false,
};

Expand Down
2 changes: 1 addition & 1 deletion packages/js/src/containers/SEMrushRelatedKeyphrases.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default compose( [
isPending: getSEMrushIsRequestPending(),
requestHasData: getSEMrushRequestHasData(),
lastRequestKeyphrase: getSEMrushRequestKeyphrase(),

};
} ),
withDispatch( ( dispatch ) => {
Expand Down
2 changes: 0 additions & 2 deletions packages/js/src/containers/SEMrushRelatedKeyphrasesModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,13 @@ export default compose( [
const {
getSEMrushModalOpen,
getSEMrushLoginStatus,
getIsElementorEditor,
getSEMrushSelectedCountry,
getPreference,
} = select( "yoast-seo/editor" );

return {
whichModalOpen: getSEMrushModalOpen(),
isLoggedIn: getSEMrushLoginStatus(),
shouldCloseOnClickOutside: ! getIsElementorEditor(),
countryCode: getSEMrushSelectedCountry(),
isRtl: getPreference( "isRtl", false ),
};
Expand Down

0 comments on commit 6061d8f

Please sign in to comment.