Created
May 23, 2022 19:38
-
-
Save lobot/f3ef64046357bed9c8db35bb0088c8fd to your computer and use it in GitHub Desktop.
Adding Address Autocomplete to Medusa
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const handleSelect = ({ value }) => { | |
setFieldValue('postal_code', value.zip_code) | |
setFieldValue('city', value.city) | |
setFieldValue('province', value.state.toUpperCase()) | |
setFieldValue('address_1', value.primary_line) | |
setFieldValue('country_code', 'US') | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment