React B - 24 - filtering Platforms

Hi. I encountered weird behaviour, when I try to filter games by dropdown menu on Game-hub. Every possible platform works except PLAYSTATION. It sends null request to server.
Is here anyone with same issue? I can’t find the problem specifically to Playstation hard-coded anywhere because it’s rendered dynamically.
Thanks for help

PC selected:

PS selected:

Right now I’m at 39, building for Production but this still does not work. Even with Static Data.

I also had this problem, could not fix it, can not remember the details, but I see I eventually just removed playstation from my list of platforms. Not ideal, I know.

senior friend of mine took a glance at my code. So I have good news for you.

At the top of the video, Mosh wrote that he made a mistake and you should use parent_platforms instead of platforms. We’re “asking” for wrong atribute here.

If your query asks for platforms, you get for playstation return as - “playstation2” and that’s the problem. If you ask for parent_platforms, playstation returns only “playstation”.

So to fix the issue - find platform and change it for parent_platforms: in - useGames.ts, PlatformSelector in App.tsx and finally - GameHeading.tsx

2 Likes

Thanks so much :slight_smile: I did see the message flash up at the top of the video - but assumed the solution had been worked into the video

1 Like