mirror of
https://github.com/aclindsa/moneygo.git
synced 2024-12-27 16:02:27 -05:00
24 lines
532 B
JavaScript
24 lines
532 B
JavaScript
var assign = require('object-assign');
|
|
|
|
var ReportConstants = require('../constants/ReportConstants');
|
|
var UserConstants = require('../constants/UserConstants');
|
|
|
|
const initialState = {
|
|
report: null,
|
|
seriesTraversal: []
|
|
};
|
|
|
|
module.exports = function(state = initialState, action) {
|
|
switch (action.type) {
|
|
case ReportConstants.REPORT_SELECTED:
|
|
return {
|
|
report: action.report,
|
|
seriesTraversal: action.seriesTraversal
|
|
};
|
|
case UserConstants.USER_LOGGEDOUT:
|
|
return initialState;
|
|
default:
|
|
return state;
|
|
}
|
|
};
|