Code styling
Added brackets for const lambdas Converted const lambdas with multiple instructions to functions
This commit is contained in:
@ -3,10 +3,12 @@ import { OsmAddressResponse } from './types'
|
||||
|
||||
const initialOsmAddress = ''
|
||||
|
||||
const composeOsmAddressURL = (addressPosition: LatLng) =>
|
||||
const composeOsmAddressURL = (addressPosition: LatLng) => (
|
||||
`${location.protocol}//nominatim.openstreetmap.org/reverse?format=json&accept-language=ru&lat=${addressPosition.lat}&lon=${addressPosition.lng}`
|
||||
)
|
||||
|
||||
const processOsmAddress = (data: OsmAddressResponse): string =>
|
||||
const processOsmAddress = (data: OsmAddressResponse): string => (
|
||||
data.display_name
|
||||
)
|
||||
|
||||
export { initialOsmAddress, composeOsmAddressURL, processOsmAddress }
|
||||
|
Reference in New Issue
Block a user