Context api values reading NaN when used for calculation in a function but returns as a number when logged to the console individually
I’m trying to get the percent of a number using numbers gotten from an api endpoint which I saved globally using context api but each time I pass the number to the function doing the calculation it returns NaN but when I log the inputs used for the calculation on the console it shows the actual numbers.