Code styling

Added brackets for const lambdas
Converted const lambdas with multiple instructions to functions
This commit is contained in:
2023-07-15 12:55:25 +03:00
parent 99d2b92b03
commit 0218cdced5
24 changed files with 106 additions and 69 deletions

View File

@ -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 }