link fe: remove unused link-initial logic

Also includes up-to-date index.js.
This commit is contained in:
Fang 2020-02-06 17:33:34 +01:00
parent ecf9dacbc0
commit 2f1f9b9c56
No known key found for this signature in database
GPG Key ID: EB035760C1BBA972
2 changed files with 2 additions and 20 deletions

File diff suppressed because one or more lines are too long

View File

@ -3,7 +3,7 @@ import _ from 'lodash';
export class InitialReducer {
reduce(json, state) {
let data = _.get(json, 'contact-initial', false);
let data = _.get(json, 'contact-initial', false);
if (data) {
state.contacts = data;
}
@ -14,24 +14,6 @@ export class InitialReducer {
state.groups[group] = new Set(data[group]);
}
}
data = _.get(json, 'link', false);
if (data) {
let name = Object.keys(data)[0];
let initial = {};
initial[name] = {};
initial[name]["total-pages"] = data[name]["total-pages"];
initial[name]["total-items"] = data[name]["total-items"];
initial[name]["page0"] = data[name]["page"];
if (!!state.links[name]) {
let origin = state.links[name];
_.extend(initial[name], origin);
} else {
state.links[name] = {};
}
state.links[name] = initial[name];
}
}
}