Use new API in domain lists

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
This commit is contained in:
Mcat12
2018-01-12 19:48:04 -05:00
parent ca3d3d60aa
commit 3790ecaabc
2 changed files with 3 additions and 7 deletions
+2 -6
View File
@@ -20,12 +20,8 @@ function reply_data(data) {
}
}
function list(listType) {
const result = {};
result[listType + "list"] = (new Array(10)).fill(null).map(() => faker.internet.domainName());
return reply_data(result);
function list() {
return reply_data((new Array(10)).fill(null).map(() => faker.internet.domainName()));
}
function status() {
+1 -1
View File
@@ -69,7 +69,7 @@ export default class ListPage extends Component {
onRefresh = () => {
this.refreshHandler = makeCancelable(this.props.refresh());
this.refreshHandler.promise.then(data => {
this.setState({ domains: data[Object.keys(data)[0]] });
this.setState({ domains: data });
}).catch(ignoreCancel);
};