@kids-reporter/draft-editor 0.4.11 → 0.4.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -58,7 +58,11 @@ function NewsReadingInput({
|
|
|
58
58
|
const [warning, setWarning] = (0, _react.useState)('');
|
|
59
59
|
const confirmInput = async () => {
|
|
60
60
|
try {
|
|
61
|
+
var _newsReadingGroup$ite;
|
|
61
62
|
const newsReadingGroup = await fetchNewsReadingGroup(inputValueState);
|
|
63
|
+
if (newsReadingGroup === null || (newsReadingGroup === null || newsReadingGroup === void 0 || (_newsReadingGroup$ite = newsReadingGroup.items) === null || _newsReadingGroup$ite === void 0 ? void 0 : _newsReadingGroup$ite.length) === 0) {
|
|
64
|
+
throw new Error(`input ${inputValueState} has no data.`);
|
|
65
|
+
}
|
|
62
66
|
onConfirm({
|
|
63
67
|
newsReadingGroupId: inputValueState,
|
|
64
68
|
newsReadingGroup
|
|
@@ -108,7 +112,11 @@ function NewsReadingInput({
|
|
|
108
112
|
},
|
|
109
113
|
placeholder: "News-readings-groups Item ID",
|
|
110
114
|
type: "text",
|
|
111
|
-
value: inputValueState
|
|
115
|
+
value: inputValueState,
|
|
116
|
+
style: {
|
|
117
|
+
marginBottom: '10px',
|
|
118
|
+
marginTop: '30px'
|
|
119
|
+
}
|
|
112
120
|
}))));
|
|
113
121
|
}
|
|
114
122
|
function NewsReadingButton(props) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kids-reporter/draft-editor",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.12",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
],
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@kids-reporter/draft-renderer": "^0.4.
|
|
26
|
+
"@kids-reporter/draft-renderer": "^0.4.12",
|
|
27
27
|
"@twreporter/errors": "^1.1.2",
|
|
28
28
|
"draft-js": "^0.11.7"
|
|
29
29
|
},
|