Skip to content

Commit

Permalink
Updated Country/City properties
Browse files Browse the repository at this point in the history
  • Loading branch information
Ref-Bit authored Aug 18, 2022
1 parent b8f03a0 commit d138290
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/context/Global.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ export const GlobalProvider = ({children}) => {
/* GET CITY NAMES */
getCityCountry()
.then(data => {
setCity(data.city)
setCity(data.data.location.city.name)
})
.catch( err => console.log(err))

/* GET RECIPE AREAS NAMES */
getCityCountry()
.then(data => {
setCountry(data.country_code)
setCountry(data.data.location.country.alpha2)
})
.catch( err => console.log(err))
}, [])
Expand Down

0 comments on commit d138290

Please sign in to comment.