mirror of
https://github.com/urbit/shrub.git
synced 2024-11-27 18:34:48 +03:00
link fe: remove unused link-initial logic
Also includes up-to-date index.js.
This commit is contained in:
parent
ecf9dacbc0
commit
2f1f9b9c56
File diff suppressed because one or more lines are too long
@ -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];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user