Skip to content

Commit

Permalink
Update Crypto.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Mistydz authored Sep 18, 2021
1 parent 1b7de75 commit 12d9896
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/src/components/Crypto.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 12d9896

Please sign in to comment.