react-code-dataset / facenovel /frontend /reducers /session_errors_reducer.js
Devendra174's picture
Upload folder using huggingface_hub
f5071ca verified
raw
history blame contribute delete
389 Bytes
import {
RECEIVE_SESSION_ERRORS ,
RECEIVE_CURRENT_USER
} from '../actions/session_actions';
const sessionErrorsReducer = (state = [], action) => {
Object.freeze(state);
switch (action.type) {
case RECEIVE_SESSION_ERRORS:
return action.errors;
case RECEIVE_CURRENT_USER:
return [];
default:
return state;
}
};
export default sessionErrorsReducer;