mirror of
https://github.com/yldio/copilot.git
synced 2024-11-10 21:30:06 +02:00
navigate to the right
This commit is contained in:
parent
e50b68b6ee
commit
5f630f30f4
@ -1,12 +1,12 @@
|
||||
const takeRight = require('lodash.takeright');
|
||||
const take = require('lodash.take');
|
||||
|
||||
const actions = {
|
||||
'UPDATE_STATS': (state, action) => {
|
||||
const data = (state[action.subscription] || []).concat([action.payload]);
|
||||
const data = [action.payload].concat(state[action.subscription] || []);
|
||||
|
||||
return {
|
||||
...state,
|
||||
[action.subscription]: takeRight(data, state.windowSize)
|
||||
[action.subscription]: take(data, state.windowSize)
|
||||
};
|
||||
}
|
||||
};
|
||||
|
@ -24,7 +24,7 @@
|
||||
"hapi": "^15.2.0",
|
||||
"hapi-webpack-dev-plugin": "^1.1.4",
|
||||
"inert": "^4.0.2",
|
||||
"lodash.takeright": "^4.1.1",
|
||||
"lodash.take": "^4.1.1",
|
||||
"nes": "^6.3.1",
|
||||
"postcss-loader": "^1.0.0",
|
||||
"postcss-modules-values": "^1.2.2",
|
||||
|
@ -19,7 +19,7 @@ module.exports = (server) => ({
|
||||
when: new Date().getTime(),
|
||||
cpu: Math.random() * 100
|
||||
});
|
||||
}, 32);
|
||||
}, 100);
|
||||
|
||||
cdm[id] = {
|
||||
interval,
|
||||
|
Loading…
Reference in New Issue
Block a user