Stop requesting bad outfit thumbnails in wardrobe

Oops, our cutesy feature to show an outfit thumbnail sa a placeholder while the rest of the data is loading was making spurious requests!

I put the `skip` in the wrong place 😅

This caused a request to https://outfits.openneo-assets.net/outfits/null/v/NaN/300.png, which would return a 500.

The user wouldn't see anything, because the image wouldn't show because it failed. But it's a mistake, and it's sending extra requests from the client and to the server, and it's a good one to fix!
This commit is contained in:
Emi Matchu 2021-11-01 16:05:13 -07:00
parent 086ada40f1
commit e4567d04bf

View file

@ -72,8 +72,8 @@ function OutfitThumbnailIfCached({ outfitId }) {
{ {
variables: { variables: {
outfitId, outfitId,
skip: outfitId == null,
}, },
skip: outfitId == null,
fetchPolicy: "cache-only", fetchPolicy: "cache-only",
onError: (e) => console.error(e), onError: (e) => console.error(e),
} }