Skip to content

Commit 0106476

Browse files
committed
Change API_HOST
1 parent efe3c4a commit 0106476

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

src/containers/MainMenu/index.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@ const MainMenu = ({ active, closeMenu, openMenu, updateBusiness }) => {
99
const [categories, setCategories] = useState([])
1010

1111
useEffect(() => {
12-
const { API } = process.env
12+
const { API_HOST } = process.env
1313
const featchData = async () => {
14-
const res = await axios.get(`${API || 'http://localhost:5000'}/category`)
15-
console.log('URL', `${API || 'http://localhost:5000'}/category`)
14+
const res = await axios.get(
15+
`${API_HOST || 'http://localhost:5000'}/category`
16+
)
17+
console.log('URL', `${API_HOST || 'http://localhost:5000'}/category`)
1618
console.log('category', res.data)
1719

1820
setCategories(() => res.data)

0 commit comments

Comments
 (0)