Skip to content

Commit

Permalink
Merge pull request #21809 from Yoast/21808-restore-get-more-insights-…
Browse files Browse the repository at this point in the history
…link-below-related-keyphrase-table

restore the add more insights link
  • Loading branch information
leonidasmi authored Nov 8, 2024
2 parents 820c491 + 0ef49d6 commit 3127873
Showing 1 changed file with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { Fragment } from "@wordpress/element";
import { KeyphrasesTable } from "@yoast/related-keyphrase-suggestions";
import { Root } from "@yoast/ui-library";
import { __ } from "@wordpress/i18n";
import { __, sprintf } from "@wordpress/i18n";
import PropTypes from "prop-types";
import { isEmpty } from "lodash";

Expand All @@ -14,6 +14,7 @@ import SEMrushUpsellAlert from "./modals/SEMrushUpsellAlert";
import SEMrushRequestFailed from "./modals/SEMrushRequestFailed";
import SEMrushMaxRelatedKeyphrases from "./modals/SEMrushMaxRelatedKeyphrases";
import getL10nObject from "../analysis/getL10nObject";
import { makeOutboundLink } from "@yoast/helpers";

/**
* Determines whether the error property is present in the passed response object.
Expand Down Expand Up @@ -96,6 +97,9 @@ export default function RelatedKeyphraseModalContent( props ) {
} = props;

const isPremium = getL10nObject().isPremium;
const GetMoreInsightsLink = makeOutboundLink();
const url = "https://www.semrush.com/analytics/keywordoverview/?q=" + encodeURIComponent( keyphrase ) +
"&db=" + encodeURIComponent( countryCode );

return (
<Fragment>
Expand Down Expand Up @@ -126,7 +130,17 @@ export default function RelatedKeyphraseModalContent( props ) {
data={ response?.results?.rows }
renderButton={ renderAction }
/>
<p className="yst-mb-0 yst-mt-2">
<GetMoreInsightsLink href={ url }>
{ sprintf(
/* translators: %s expands to Semrush */
__( "Get more insights at %s", "wordpress-seo" ),
"Semrush"
) }
</GetMoreInsightsLink>
</p>
</Root>

</Fragment>
);
}
Expand Down

0 comments on commit 3127873

Please sign in to comment.