mirror of
https://github.com/gosticks/web.git
synced 2026-12-03 17:51:39 +00:00
Use new API in domain lists
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
This commit is contained in:
+2
-6
@@ -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() {
|
||||
|
||||
@@ -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);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user