AG-420 Improve React implementation

This commit is contained in:
Sean Landsman
2017-05-23 17:51:33 +01:00
parent e183a0503a
commit 06ebb8bf18
11 changed files with 217 additions and 321 deletions

View File

@@ -0,0 +1,16 @@
export default (state = {fxData: [], fxTopMovers: []}, action) => {
switch (action.type) {
case 'FX_DATA_CHANGED':
return {
...state,
fxData: action.fxData.slice(0),
};
case 'FX_TOP_MOVERS_CHANGED':
return {
...state,
fxTopMovers: action.fxTopMovers.slice(0),
};
default:
return action.state;
}
};