dev #9
Vendored
+4
-1
@@ -10013,13 +10013,16 @@ function DataOptions(props = {}) {
|
|||||||
errorMessage: null
|
errorMessage: null
|
||||||
});
|
});
|
||||||
return fetch(url, requestOptions).then(response => response.json()).then(result => {
|
return fetch(url, requestOptions).then(response => response.json()).then(result => {
|
||||||
|
console.log(result);
|
||||||
if (result.statusCode !== 200) {
|
if (result.statusCode !== 200) {
|
||||||
throw new Error(result.message);
|
throw new Error(result.message);
|
||||||
}
|
}
|
||||||
const data = result.variation;
|
const data = result.variation;
|
||||||
updateState({
|
updateState({
|
||||||
dataText: JSON.stringify(data, null, 2),
|
dataText: JSON.stringify(data, null, 2),
|
||||||
data
|
data,
|
||||||
|
errorMessage: null,
|
||||||
|
loading: false
|
||||||
});
|
});
|
||||||
updateIframe(data);
|
updateIframe(data);
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
|
|||||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -125,12 +125,13 @@ function DataOptions(props = {}) {
|
|||||||
return fetch(url, requestOptions)
|
return fetch(url, requestOptions)
|
||||||
.then(response => response.json())
|
.then(response => response.json())
|
||||||
.then(result => {
|
.then(result => {
|
||||||
|
console.log(result)
|
||||||
if (result.statusCode !== 200) {
|
if (result.statusCode !== 200) {
|
||||||
throw new Error(result.message);
|
throw new Error(result.message);
|
||||||
}
|
}
|
||||||
|
|
||||||
const data = result.variation;
|
const data = result.variation;
|
||||||
updateState({dataText: JSON.stringify(data, null, 2), data});
|
updateState({dataText: JSON.stringify(data, null, 2), data, errorMessage: null, loading: false});
|
||||||
updateIframe(data);
|
updateIframe(data);
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
|
|||||||
+3
-3
@@ -7,9 +7,9 @@
|
|||||||
"url": "https://axe-web.com/"
|
"url": "https://axe-web.com/"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"info": "NODE_ENV=development BLOCK_NAME=header MODULE_PATH= node debug.js",
|
"info": "NODE_ENV=development BLOCK_NAME=comparison-table MODULE_PATH= node debug.js",
|
||||||
"dev": "NODE_ENV=development BLOCK_NAME=header MODULE_PATH= node server.js",
|
"dev": "NODE_ENV=development BLOCK_NAME=comparison-table MODULE_PATH= node server.js",
|
||||||
"build-platform": "NODE_ENV=development BLOCK_NAME=header MODULE_PATH= node ./build.js",
|
"build-platform": "NODE_ENV=development BLOCK_NAME=comparison-table MODULE_PATH= node ./build.js",
|
||||||
"dev-dev-tool": "NODE_ENV=development rollup --config rollup.config.js --watch",
|
"dev-dev-tool": "NODE_ENV=development rollup --config rollup.config.js --watch",
|
||||||
"build-dev-tool": "rollup --config rollup.config.js"
|
"build-dev-tool": "rollup --config rollup.config.js"
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user