|
@@ -4,32 +4,19 @@ import { Field, reduxForm } from 'redux-form';
|
|
|
import './filtersEvents.scss';
|
|
|
|
|
|
let FiltersEvents = props => {
|
|
|
- const { handleSubmit } = props;
|
|
|
+ const { handleSubmit, getAllEvents } = props;
|
|
|
|
|
|
const submit = value => {
|
|
|
console.log(value);
|
|
|
- //postLoginSubmit(value);
|
|
|
+ getAllEvents(value.typeEvent);
|
|
|
};
|
|
|
|
|
|
return (
|
|
|
<form className="form" onSubmit={handleSubmit(submit)}>
|
|
|
- <div>
|
|
|
- <label htmlFor="country">Country</label>
|
|
|
- <Field name="country" component="select">
|
|
|
- <option value="country1">country1</option>
|
|
|
- <option value="country2">country2</option>
|
|
|
- </Field>
|
|
|
- </div>
|
|
|
- <div>
|
|
|
- <label htmlFor="city">City</label>
|
|
|
- <Field name="city" component="select">
|
|
|
- <option value="city1">city1</option>
|
|
|
- <option value="city2">city2</option>
|
|
|
- </Field>
|
|
|
- </div>
|
|
|
<div>
|
|
|
<label htmlFor="typeEvent">Type event</label>
|
|
|
<Field name="typeEvent" component="select">
|
|
|
+ <option value="All events">All events</option>
|
|
|
<option value="Marathon">Marathon</option>
|
|
|
<option value="Triathlon">Triathlon</option>
|
|
|
<option value="Cycling">Cycling</option>
|