{"size": 892, "ext": "js", "max_stars_repo_path": "src/components/guest-callback/GuestCallbackContainer.js", "max_stars_repo_name": "wombats-writing-code/fbw-platform-common", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/components/guest-callback/GuestCallbackContainer.js", "max_issues_repo_name": "wombats-writing-code/fbw-platform-common", "max_issues_repo_issues_event_min_datetime": "2017-01-12T02:57:02.000Z", "max_issues_repo_issues_event_max_datetime": "2019-12-24T02:00:56.000Z", "max_forks_repo_path": "src/components/guest-callback/GuestCallbackContainer.js", "max_forks_repo_name": "wombats-writing-code/fbw-platform-common", "max_forks_repo_forks_event_min_datetime": "2017-02-15T21:36:54.000Z", "max_forks_repo_forks_event_max_datetime": "2017-02-15T21:36:54.000Z"}
{"max_stars_count": null, "max_issues_count": 7, "max_forks_count": 1, "avg_line_length": 27.0303030303, "max_line_length": 92, "alphanum_fraction": 0.7230941704}
import _ from 'lodash';
import { connect, dispatch } from 'react-redux'
import GuestCallback from './web/GuestCallback'

import {authenticateGuest } from '../../reducers/Login/authenticateGuest'
import { failedLogIn } from '../../selectors'

const mapStateToProps = (state, ownProps) => {
  return {
    failedLogIn: failedLogIn(state)
  }
}

const mapDispatchToProps = (dispatch, ownProps) => {
  return {
    authenticateGuest: (credentials, name) => dispatch(authenticateGuest(credentials, name))
  }
}

const provider = (component, credentials) => {
  let mergeProps = (stateProps, dispatchProps, ownProps) => {
    return _.assign({}, stateProps, dispatchProps, ownProps, {
      credentials
    })
  }

  return connect(mapStateToProps, mapDispatchToProps, mergeProps)(component)
}

export default provider

// export default connect(mapStateToProps, mapDispatchToProps)(GuestCallback)
