import { connect } from 'react-redux';
import { arrayPush, reduxForm, getFormValues } from 'redux-form';
import { withRouter } from 'react-router-dom';
import app from 'store/app';
import GenericForm from './GenericForm';

const mapStateToProps = state => ({
  content: state.content.raw,
  loading: state.generic.loading,
});

const mapDispatchToProps = {
  setForm: app.actions.setForm.action,
};

const Wrapped = connect(mapStateToProps, mapDispatchToProps)(GenericForm);

export default withRouter(Wrapped);
