verdnatura-chat/app/reducers/share.js

24 lines
382 B
JavaScript
Raw Normal View History

2019-07-29 16:33:28 +00:00
import { SHARE } from '../actions/actionsTypes';
const initialState = {
user: {},
server: ''
};
export default function share(state = initialState, action) {
switch (action.type) {
case SHARE.SELECT_SERVER:
return {
...state,
server: action.server
};
case SHARE.SET_USER:
return {
...state,
user: action.user
};
default:
return state;
}
}