Add attendees and suggestions (except for UI)

This commit is contained in:
2016-12-26 08:29:18 -05:00
parent c4f07d3b3e
commit c8232050da
11 changed files with 283 additions and 14 deletions

View File

@ -0,0 +1,20 @@
var assign = require('object-assign');
var SuggestionConstants = require('../constants/SuggestionConstants');
var UserConstants = require('../constants/UserConstants');
module.exports = function(state = {}, action) {
switch (action.type) {
case SuggestionConstants.POPULAR_SUGGESTIONS_FETCHED:
var suggestions = {};
for (var i = 0; i < action.suggestions.length; i++) {
var suggestion = action.suggestions[i];
suggestions[suggestion.SuggestionId] = suggestion;
}
return suggestions;
case UserConstants.USER_LOGGEDOUT:
return {};
default:
return state;
}
};