diff --git a/src/common/Form/LocationSearch.field.tsx b/src/common/Form/LocationSearch.field.tsx deleted file mode 100644 index ce70c9fc5..000000000 --- a/src/common/Form/LocationSearch.field.tsx +++ /dev/null @@ -1,49 +0,0 @@ -import { OsmGeocoding } from 'oa-components' -import { logger } from 'src/logger' -import { getLocationData } from 'src/utils/getLocationData' - -import type { FieldProps } from './types' - -interface IExtendedFieldProps extends FieldProps { - // add additional onChange style method to respond more directly to value changes - // without need for react-final-form listener - customChange?: (location) => void -} - -export const LocationSearchField = ({ - input, - customChange, -}: IExtendedFieldProps) => ( - <> -
-
- { - logger.debug(data, 'LocationSearch.field.ReactOsmGeocoding') - if (data.lat && data.lon) { - // onPositionChanged({ - // lat: data.lat, - // lng: data.lon, - // }) - // setCenter([data.lat, data.lon]) - // setZoom(15) - - const location = await getLocationData({ - lat: data.lat, - lng: data.lon, - }) - - input.onChange(location) - if (customChange) { - customChange(location) - } - input.onBlur() - } - }} - countrycodes="" - acceptLanguage="en" - /> -
-
- -)