From 05f605cbd991d0f01107d269dc61f6f7db098445 Mon Sep 17 00:00:00 2001 From: Mehul Porwal <64722605+mehulgithub-1903@users.noreply.github.com> Date: Wed, 8 Jun 2022 11:35:55 +0530 Subject: [PATCH] Update In CoinInfo.js When on the coin info page - if you change the currency - the price axis of the graph/chart won't change accordingly that is what I corrected updated- useEffect() will also be triggered by the change of currency also --- src/components/CoinInfo.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/CoinInfo.js b/src/components/CoinInfo.js index 126ae68..db6b41e 100644 --- a/src/components/CoinInfo.js +++ b/src/components/CoinInfo.js @@ -49,7 +49,7 @@ const CoinInfo = ({ coin }) => { useEffect(() => { fetchHistoricData(); // eslint-disable-next-line react-hooks/exhaustive-deps - }, [days]); + }, [currency,days]); const darkTheme = createTheme({ palette: {