@100mslive/react-native-room-kit
Version:
100ms Room Kit provides simple & easy to use UI components to build Live Streaming & Video Conferencing experiences in your apps.
31 lines • 734 B
JavaScript
import { HmsStateActionTypes } from '../actionTypes';
const INITIAL_STATE = {
showChatView: false,
typedMessage: '',
sendTo: null
};
const chatWindowReducer = (state = INITIAL_STATE, action) => {
switch (action.type) {
case 'SET_SENDTO':
return {
...state,
sendTo: action.sendTo
};
case 'SET_TYPED_MESSAGE':
return {
...state,
typedMessage: action.typedMessage
};
case 'SET_SHOW_CHAT_VIEW':
return {
...state,
showChatView: action.showChatView
};
case HmsStateActionTypes.CLEAR_STATES:
return INITIAL_STATE;
default:
return state;
}
};
export default chatWindowReducer;
//# sourceMappingURL=chatWindow.js.map