From 12d989664f5b63c53c089d3439106626eb0d933e Mon Sep 17 00:00:00 2001 From: Mohammed Marwan <61049928+Mistydz@users.noreply.github.com> Date: Sat, 18 Sep 2021 14:11:54 +0100 Subject: [PATCH] Update Crypto.js --- client/src/components/Crypto.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/components/Crypto.js b/client/src/components/Crypto.js index 69adbb7..d317404 100644 --- a/client/src/components/Crypto.js +++ b/client/src/components/Crypto.js @@ -12,7 +12,7 @@ function Crypto() { useEffect(() => { async function fetchData() { - Axios.get(`http://localhost:5000/api/crypto?api_key=${process.env.REACT_APP_API_KEY}`).then(response => { + Axios.get(`/api/crypto?api_key=${process.env.REACT_APP_API_KEY}`).then(response => { setDbList(response.data); setFetching(false); setTimeout(fetchData, 4000); // Change the numeric value for the frequency you want to call the api and update your price value with @@ -24,7 +24,7 @@ function Crypto() { useEffect(() => { async function fetchClass() { - Axios.get(`http://localhost:5000/api/cryptoups?api_key=${process.env.REACT_APP_API_KEY}`).then(response => { + Axios.get(`/api/cryptoups?api_key=${process.env.REACT_APP_API_KEY}`).then(response => { setClassList(response.data.data); setFetchingc(false); setTimeout(fetchClass, 4000); // Change the numeric value for the frequency you want to call the api and update your price value with