{"size": 578, "ext": "js", "max_stars_repo_path": "src/containers/RegisterContainer.js", "max_stars_repo_name": "dipbazz/track-my-fitness-ui", "max_stars_repo_stars_event_min_datetime": "2021-11-01T09:22:24.000Z", "max_stars_repo_stars_event_max_datetime": "2021-11-01T09:22:24.000Z", "max_issues_repo_path": "src/containers/RegisterContainer.js", "max_issues_repo_name": "dipbazz/track-my-fitness-ui", "max_issues_repo_issues_event_min_datetime": "2021-08-06T15:12:14.000Z", "max_issues_repo_issues_event_max_datetime": "2021-08-06T15:12:14.000Z", "max_forks_repo_path": "src/containers/RegisterContainer.js", "max_forks_repo_name": "dipbazz/track-my-fitness-ui", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": 1, "max_forks_count": null, "avg_line_length": 32.1111111111, "max_line_length": 72, "alphanum_fraction": 0.7422145329}
import { connect } from 'react-redux';
import Register from '../components/Register';
import { resetUser } from '../redux/actions';
import { registerUserAsync } from '../redux/actions/thunk';

const mapStateToProps = (state) => ({
  isLoading: state.currentUser.isLoading,
  apiError: state.currentUser.error,
  isAuthenticated: state.currentUser.isAuthenticated,
});

const mapDispatchToProps = {
  registerUser: (email, password) => registerUserAsync(email, password),
  resetUser: () => resetUser(),
};

export default connect(mapStateToProps, mapDispatchToProps)(Register);
