.then(data => dispatch(fetchSuccess(data.success)))
case 'LOGIN_USER_SUCCESS':
return {
...state,
key: action.key,
};
const mapStateToProps = state => ({
success: state.authorisation.key,
});
export default connect(mapStateToProps)(YourComponent);