Created
January 29, 2020 04:16
-
-
Save thiagobutignon/8061b5a5a72efb562323ce3675549b79 to your computer and use it in GitHub Desktop.
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
{touched.zipcode && !errors.zipcode | |
? setTimeout(() => { | |
cep(values.zipcode) | |
.then(response => { | |
setFieldTouched('zipcode', false); | |
console.log(response); | |
setFieldValue('street', response.street); | |
setFieldValue('city', response.city); | |
setFieldValue('state', response.state); | |
setFieldValue('neighborhood', response.neighborhood); | |
}, 100) | |
.catch(error => console.log(error)); | |
}) | |
: console.log('deu ruim')} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment