Closed RichardHpa closed 1 year ago
If you look at the data source:
https://github.com/PokemonTCG/pokemon-tcg-data/blob/master/sets/en.json
There isn't a duplicate for ex5 (your example) could you just do a sanity check and pull back all sets and see if there is the duplicates as there shouldn't
ok i have managed to replicate the situation. My api call has 3 params. Pagesize with is 8, page which is whatever page you are on, and orderBy which I am setting to releaseDate (i know thats default but just using it as an example)
if you got to these 2 apis calls which technically should be different, they both include ex5
page 3 https://api.pokemontcg.io/v2/sets?pageSize=8&page=3&orderBy=releaseDate page 4 https://api.pokemontcg.io/v2/sets?pageSize=8&page=4&orderBy=releaseDate
This should be fixed.
@adback03 it isnt fixed yet, if you click on those 2 links I have provided above they both still include ex5
@adback03 could you please relook at this as it still isnt fixed, check the api links in the comment above. If that is expected behaviour then also please let me know
I am using the typescript sdk and making a request to get sets like bellow.
I have an infinite scroll function added that makes a new request by bumping the page number up and then adding the next set of results to the components state. I am then mapping over that data and using the set.id as the key in the map. When I do that though I often get an error saying duplicate keys. It often appears for set.id of ex5. I don't think its anything wrong with my code as all I am doing is changing the page number but sometimes the api still returns data that should of been in the previous request.
You can see the full implementation of it here https://github.com/RichardHpa/pokemon-tgc-collector/blob/feature/sets/app/routes/expansions/index.tsx