jiti-meet/react/features/calendar-sync/reducer.js

29 lines
590 B
JavaScript
Raw Normal View History

2018-02-08 18:50:19 +00:00
// @flow
import { ReducerRegistry } from '../base/redux';
import { NEW_CALENDAR_ENTRY_LIST } from './actionTypes';
/**
* ZB: this is an object, as further data is to come here, like:
* - known domain list
*/
const DEFAULT_STATE = {
events: []
};
const STORE_NAME = 'features/calendar-sync';
ReducerRegistry.register(
STORE_NAME,
(state = DEFAULT_STATE, action) => {
switch (action.type) {
case NEW_CALENDAR_ENTRY_LIST:
return {
events: action.events
};
default:
return state;
}
});