From 01064760412697aaab60fa1cd11f69d2dc1e11b9 Mon Sep 17 00:00:00 2001 From: Marco Bruno Date: Tue, 1 Oct 2019 03:15:12 +0100 Subject: [PATCH] Change API_HOST --- src/containers/MainMenu/index.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/containers/MainMenu/index.js b/src/containers/MainMenu/index.js index b48bea7..8e45712 100644 --- a/src/containers/MainMenu/index.js +++ b/src/containers/MainMenu/index.js @@ -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)