Add more reports
This commit is contained in:
19
js/reducers/ReportReducer.js
Normal file
19
js/reducers/ReportReducer.js
Normal file
@ -0,0 +1,19 @@
|
||||
var assign = require('object-assign');
|
||||
|
||||
var ReportConstants = require('../constants/ReportConstants');
|
||||
var UserConstants = require('../constants/UserConstants');
|
||||
|
||||
module.exports = function(state = {}, action) {
|
||||
switch (action.type) {
|
||||
case ReportConstants.REPORT_FETCHED:
|
||||
var report = action.report;
|
||||
var reports = assign({}, state, {
|
||||
[report.ReportId]: report
|
||||
});
|
||||
return reports;
|
||||
case UserConstants.USER_LOGGEDOUT:
|
||||
return {};
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user