Hi,
I’m trying to make a chart with data fetched from an API. Apparently I don’t pass the data correctly to the chart I think, when I console.log it says undefined.
I’ve tried different approaches on it but none seemed to work, I’m still unsure if the problem is in the action or reducer.. or both. Really don’t know what to do anymore on it.
https://api.coingecko.com/api/v3/coins/moon/market_chart?vs_currency=usd&days=1&interval=hourly
Here is the API I’m using, but instead of days=1 I’m passing it a variable so I’m able to fetch data dynamically for a different timestamp.
I’ve recreated the environment in a sandbox
https://codesandbox.io/s/fragrant-leaf-ymu5p?file=/src/components/index.js
submitted by /u/good-as-hellx
[link] [comments]