Closed igihcksn closed 2 years ago
Hi @igihcksn, I can help with this one! Would you mind assigning me? Thanks!
Yes sure @cgilroy let me know if u have done with this issue, don't forget to attach the screenshot, thank you
Something strange I'm noticing is the version data for a pokemon always a name: 'hp'
value. Can you reproduce this @igihcksn? I'm wondering if the GraphQL API is sending bad data, though the query does work well here... 🤔
I just noticed if I change things in the useQuery
in details.js
to not use the cache, then I get the correct name
attribute. I don't understand the Apollo cache very well, but I wonder if doing this is okay?
const PokeCommonData = useQuery(QUERY.GET_POKEMON_BY_NAME, {
fetchPolicy: "no-cache",
variables: {
name: slug
}
});
Good news, yes u can change it after that i'll try change in my local
Now that we can grab the correct game name
attribute, I noticed that you'd like the game logos to be shown. It doesn't look like the API provides game logo images, so do you know where we could get these? If we can't get the images from an API, we'd have to download all of them and map them out to the name
s provided by the API. This would be a pretty large chunk of work, and would require manual updates for future game releases.
Yes @cgilroy we need add the logos at asset folder then add the constant to get the logos base on the name from the api, so its still need manually process, but don't worry if there is update from the api i'll check it
This issue is to show game version with the logo in detail page as response from api pokemon detail