Devendra174's picture
Upload folder using huggingface_hub
f5071ca verified
raw
history blame contribute delete
666 Bytes
import { connect } from 'react-redux';
import { requestUserByUrl, updatePhoto } from '../../actions/user_actions';
import Profile from './profile';
import { getUserFromUrl } from '../../reducers/selectors';
const mapStateToProps = (state, ownProps) => ({
userUrl: ownProps.match.params.userUrl,
user: getUserFromUrl(state, ownProps.match.params.userUrl),
currentUserId: state.session.currentUserId
});
const mapDispatchToProps = dispatch => ({
requestUserByUrl: url => dispatch(requestUserByUrl(url)),
updatePhoto: (userId, photoData) => dispatch(updatePhoto(userId, photoData))
});
export default connect(mapStateToProps, mapDispatchToProps)(Profile);