import React, { Component } from "react"; import { reduxForm, Field } from "redux-form"; import "./adminResultsForm.scss"; import { customInput } from "../customFields/customInput/customInput"; import { customSelect } from "../customFields/customSelect/customSelect"; class AdminResultsForm extends Component { // state = { // addPhotogalaryInitialValue, // filteredEventList: [] // } submit = values => { console.log('submit props', this.props) // console.log('submit state', this.state) // const pictures = this.state.addPhotogalaryInitialValue.pictures.reduce((prev, elem) => { // return prev.concat(elem.value); // }, []); } render() { // const { filteredEventList, addPhotogalaryInitialValue } = this.state; // console.log(this.state ) const { handleSubmit, eventTypes, eventList, // eventByTitle, eventusers, onChangeTypeHandler, onChangeTitleHandler } = this.props; return (
{eventTypes.map(elem => )} {console.log('event list', eventList)} {eventList && eventList.map(elem => )}
Name
Email
Country
Distance
Time
{eventusers && eventusers.map( elem =>
{elem.name}
{elem.email}
{elem.userCountry}
{elem.distance}
)}
); } } export default reduxForm({ form: "resultsForm", enableReinitialize: true })(AdminResultsForm);