From 0444eb6a2cea8bc7450da6384d1e48eec495f72a Mon Sep 17 00:00:00 2001 From: Tariq Jamal A Date: Wed, 14 May 2025 09:44:44 +0530 Subject: [PATCH] refactor: resolve currency exchange issue --- app/contexts/currencyContext.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/contexts/currencyContext.js b/app/contexts/currencyContext.js index 83aa8f0..9d78287 100644 --- a/app/contexts/currencyContext.js +++ b/app/contexts/currencyContext.js @@ -16,10 +16,7 @@ export const CurrencyProvider = ({ children }) => { useEffect(() => { const fetchCurrencyForCountry = async () => { try { - const userCountry = localStorage.getItem('userCountry'); - if (!userCountry) { - return; - } + let userCountry = localStorage.getItem('userCountry') || "India"; const response = await axios.get(`https://restcountries.com/v3.1/name/${userCountry}`); if (response.data && response.data.length > 0) {