• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Yoast / wordpress-seo / dd6e866a9e6d253114633104d9e3858d807178ba

19 Jun 2024 10:03AM CUT coverage: 48.628% (-4.3%) from 52.936%
dd6e866a9e6d253114633104d9e3858d807178ba

push

github

web-flow
Merge pull request #21431 from Yoast/21429-update-copy-in-the-introduction-and-consent-modals

Updates the copy for the introduction and consent modals

7441 of 13454 branches covered (55.31%)

Branch coverage included in aggregate %.

0 of 3 new or added lines in 2 files covered. (0.0%)

3718 existing lines in 107 files now uncovered.

25100 of 53464 relevant lines covered (46.95%)

62392.47 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

16.67
/packages/js/src/ai-assessment-fixes/components/modal-content.js
1
/* eslint-disable complexity */
2
import { useDispatch, useSelect } from "@wordpress/data";
3
import { useMemo } from "@wordpress/element";
4
import { AiFixAssessmentsUpsell } from "../../shared-admin/components";
5
import { __, sprintf } from "@wordpress/i18n";
6

7
const STORE = "yoast-seo/editor";
2✔
8

9
/**
10
 * @returns {JSX.Element} The element.
11
 */
12
export const ModalContent = () => {
2✔
NEW
13
        const learnMoreLink = useSelect( select => select( STORE ).selectLink( "https://yoa.st/ai-fix-assessments-upsell-learn-more" ), [] );
×
14
        const upsellLinkPremium = useSelect( select => select( STORE ).selectLink( "https://yoa.st/ai-fix-assessments-upsell" ), [] );
×
15

16
        const postModalprops = {
×
17
                upsellLink: upsellLinkPremium,
18
                title: __( "Fix assessments with AI!", "wordpress-seo" ),
19
                upsellLabel: sprintf(
20
                        /* translators: %1$s expands to Yoast SEO Premium. */
21
                        __( "Unlock with %1$s", "wordpress-seo" ),
22
                        "Yoast SEO Premium"
23
                ),
24
        };
25

NEW
26
        const imageLink = useSelect( select => select( STORE ).selectImageLink( "ai-fix-assessments-thumbnail.png" ), [] );
×
27
        const thumbnail = useMemo( () => ( {
×
28
                src: imageLink,
29
                width: "432",
30
                height: "244",
31
        } ), [ imageLink ] );
32

33
        const value = useSelect( select => select( STORE ).selectWistiaEmbedPermissionValue(), [] );
×
34
        const status = useSelect( select => select( STORE ).selectWistiaEmbedPermissionStatus(), [] );
×
35
        const { setWistiaEmbedPermission: set } = useDispatch( STORE );
×
36
        const wistiaEmbedPermission = useMemo( () => ( { value, status, set } ), [ value, status, set ] );
×
37

38

39
        return (
×
40
                <AiFixAssessmentsUpsell
41
                        learnMoreLink={ learnMoreLink }
42
                        thumbnail={ thumbnail }
43
                        wistiaEmbedPermission={ wistiaEmbedPermission }
44
                        { ...postModalprops }
45
                />
46
        );
47
};
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc