Devendra174's picture
Upload folder using huggingface_hub
f5071ca verified
raw
history blame contribute delete
470 Bytes
import UserActionTypes from './user-types';
const INITIAL_STATE = {
currentUser: null,
hidden: true
}
const userReducer = (state = INITIAL_STATE, action) => {
switch(action.type) {
case UserActionTypes.SET_CURRENT_USER:
return {
...state,
currentUser: action.payload
};
case UserActionTypes.TOGGLE_HIDDEN_MENU:
return {
...state,
hidden: !state.hidden
};
default:
return state;
}
}
export default userReducer;