This repository was archived by the owner on Oct 4, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 53
/
Copy pathContentAnalysisWrapper.js
88 lines (81 loc) · 1.9 KB
/
ContentAnalysisWrapper.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
import React from "react";
import ExamplesContainer from "./ExamplesContainer";
import ContentAnalysis from "yoast-components/composites/Plugin/ContentAnalysis/components/ContentAnalysis";
import LanguageNoticeWrapper from "./LanguageNoticeWrapper.js";
/**
* Returns the ContentAnalysisWrapper component.
*
* @returns {ReactElement} The ContentAnalysisWrapper component.
*/
export default function ContentAnalysisWrapper() {
const problemsResults = [
{
text: "Your text is bad, and you should feel bad.",
id: "1",
rating: "bad",
hasMarks: true,
marker: { data: "marker" },
},
];
const goodResults = [
{
text: "You're doing <strong>great!</strong>",
id: "2",
rating: "good",
hasMarks: false,
},
{
text: "Woohoo!",
id: "3",
rating: "good",
hasMarks: true,
marker: { data: "marker" },
},
];
const improvementsResults = [
{
text: "I know you can do better! You can do it!",
id: "4",
rating: "OK",
hasMarks: false,
},
];
const errorsResults = [
{
text: "<span style=\"color: red;\">Error: Analysis not loaded</span>",
id: "5",
rating: "feedback",
hasMarks: false,
},
];
const considerationsResults = [
{
text: "Maybe you should change this...",
id: "6",
rating: "feedback",
hasMarks: false,
},
];
return (
<ExamplesContainer>
<LanguageNoticeWrapper
changeLanguageLink="#"
language="English"
showLanguageNotice={ true }
canChangeLanguage={ true }
/>
<ContentAnalysis
problemsResults={ problemsResults }
improvementsResults={ improvementsResults }
goodResults={ goodResults }
considerationsResults={ considerationsResults }
errorsResults={ errorsResults }
onMarkButtonClick={ ( id, marker ) => {
// eslint-disable-next-line no-console
console.log( "Marker button clicked", id, marker );
} }
marksButtonStatus={ "enabled" }
/>
</ExamplesContainer>
);
}