Hey, i’m having trouble getting the Moonbirds “Longest Avg Hold” “Largest Bag” and “Highest Avg Buy In” to display the correct numbers. Currently they are displaying “NaN”. I’m at 49:19 in the video.
I added some console.logs to hopefully help debug. would love some insight into where the error is.
async function getCol() {
const res = await axios.get("http://localhost:4000/", {
params: {slug: collection},
});
const data = res.data;
console.log("data",data);
console.log(“data”,data);
this prints: data Welcome to the server
const dataArray = Object.values(data);
console.log("dataArray",dataArray);
console.log(“dataArray”,dataArray);
this prints:
0: “W”
1: “e”
2: “l”
3: “c”
4: “o”
5: “m”
6: “e”
etc. prints welcome to the server.
So I guess, it doesn’t look like it’s retrieving the correct information from the correct page. I tried manually plugging in the slug etc. into the axios get request but the request gets caught in a promise. Been trying to figure this out for 3 days.
Anyone have insights into how to fix this?