Skip to content

Commit

Permalink
added Location cast to Location Selector
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardomcv committed Jul 20, 2020
1 parent 2ad5005 commit 9fccf66
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/LocationSelector/LocationSelector.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import React, { FunctionComponent, ChangeEventHandler } from 'react';
import React, { FunctionComponent } from 'react';
import { Location } from '../../sharedTypes';
import './LocationSelector.css';

interface LocationSelectorProps {
onChange: ChangeEventHandler<HTMLSelectElement>;
onChange: (location: Location) => void;
value: Location;
}

const LocationSelector: FunctionComponent<LocationSelectorProps> = ({ onChange, value }) => (
<select
className="location-selector"
onChange={onChange}
onChange={(event) => onChange(event.target.value as Location)}
value={value}
>
<option value="london">
Expand Down

0 comments on commit 9fccf66

Please sign in to comment.