Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

platforms query should be parent_platforms #2

Closed
jwillinghalpern opened this issue Mar 16, 2023 · 2 comments
Closed

platforms query should be parent_platforms #2

jwillinghalpern opened this issue Mar 16, 2023 · 2 comments

Comments

@jwillinghalpern
Copy link

Re: video 24 of the course project.

I believe the platforms query param key when filtering by platform should be parent_platforms, since parent_platforms are displayed in the dropdown menu.

E.g. If you filter by playstation, you'll get zero results, which is incorrect. "Grand Theft Auto V", for instance, has playstation in its list. I noticed some of the filtering results shown in video look off too.

I think the 'game-hub' repo has the same issue too.

Thanks for the awesome course!

Best,
Josh

@mosh-hamedani
Copy link
Owner

Hey Josh! Thanks for reporting this. You're absolutely right. I'll add a note to the course and fix this in part 2.

@MarcinMN
Copy link

I wanted to leave a note on this since I came across this page when I noticed that the Playstation filter was returning no results after completing Part 24 - Filtering Games by Platform. This way if anyone else is searching, they will have more information on how to fix the problem.

The code you need to change is in useGames.ts. Toward the bottom of the file, in the "params" object, change the line "platforms: gameQuery.platform?.id" to "parent_platforms: gameQuery.platform?.id".

That appears to have fixed the problem! Happy coding!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants