Skip to content

Commit

Permalink
Change API_HOST
Browse files Browse the repository at this point in the history
  • Loading branch information
marcobrunodev committed Oct 1, 2019
1 parent efe3c4a commit 0106476
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/containers/MainMenu/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ const MainMenu = ({ active, closeMenu, openMenu, updateBusiness }) => {
const [categories, setCategories] = useState([])

useEffect(() => {
const { API } = process.env
const { API_HOST } = process.env
const featchData = async () => {
const res = await axios.get(`${API || 'http://localhost:5000'}/category`)
console.log('URL', `${API || 'http://localhost:5000'}/category`)
const res = await axios.get(
`${API_HOST || 'http://localhost:5000'}/category`
)
console.log('URL', `${API_HOST || 'http://localhost:5000'}/category`)
console.log('category', res.data)

setCategories(() => res.data)
Expand Down

0 comments on commit 0106476

Please sign in to comment.