react-code-dataset / airbnb_clone /frontend /reducers /session_errors_reducer.js
Devendra174's picture
Upload folder using huggingface_hub
f5071ca verified
Raw
History Blame Contribute Delete
444 Bytes
import {
RECEIVE_SESSION_ERRORS,
RECEIVE_CURRENT_USER,
CLEAR_ERRORS,
} from '../actions/session_actions';
export default (state = [], action) => {
Object.freeze(state);
switch (action.type) {
case RECEIVE_SESSION_ERRORS:
return action.errors;
case RECEIVE_CURRENT_USER:
return [];
case CLEAR_ERRORS:
return [];
default:
return state;
}
};