Hello Everyone, I need help on the GameGrid and useGames section, it would be great if you could help me out

on the GameGrid component, there have problem with the results
const fetchGameCount =
data?.pages.reduce((total, page) => total + page.results.length, 0) || 0;

in the results it’s showing “Property ‘results’ does not exist on type ‘TQueryFnData’”
I have tried multiple ways but not been solved yet.

go check out my source code on github, I followed mosh with only a few changes on the time.

Thanks for your kind reply, I have done the same thing as you did in your code but useGames hook showed the error
You can look into this repo

not gotten any solution yet.

Oh i did forget to mention at some point he goes back and refactors so depending on which part of the tutorial your at, you may not be implementing the same code yet

Thanks for the reply, Yeah then I can move forward and then will get this solution.

For me 9/10 times i make a type somewhere like a cap or underscore, depending on what the error is it may be an easy fix, try to paste your code in chat gpt and checking the error code on VScode. Remember that troubleshooting is a part of coding as well. I do remember 1 or 2 issues he resolves in a later video. Although if your find with moving on you can always pull my project from git later if there is too many problems, just remember use your own api key lol.

Yeah, there is still a problem with the typescript error but I am moving forward with this, hope it will be good in the upcoming code.