Don't use the pets.neopets.com asset proxy anymore

Ah right, now that HTTPS works, we can skip this!
This commit is contained in:
Emi Matchu 2024-04-06 03:26:36 -07:00
parent 584fed70c6
commit 1617b82b18

View file

@ -30,7 +30,11 @@ function SpeciesFacesPicker({
// the query all the time, and have Apollo happen to satisfy it fast? // the query all the time, and have Apollo happen to satisfy it fast?
// The semantics of returning our colorful random set could be weird… // The semantics of returning our colorful random set could be weird…
const selectedColorIsBasic = colorIsBasic(selectedColorId); const selectedColorIsBasic = colorIsBasic(selectedColorId);
const { loading: loadingGQL, error, data } = useQuery( const {
loading: loadingGQL,
error,
data,
} = useQuery(
gql` gql`
query SpeciesFacesPicker($selectedColorId: ID!) { query SpeciesFacesPicker($selectedColorId: ID!) {
color(id: $selectedColorId) { color(id: $selectedColorId) {
@ -52,11 +56,11 @@ function SpeciesFacesPicker({
variables: { selectedColorId }, variables: { selectedColorId },
skip: selectedColorId == null || selectedColorIsBasic, skip: selectedColorId == null || selectedColorIsBasic,
onError: (e) => console.error(e), onError: (e) => console.error(e),
} },
); );
const allBodiesAreCompatible = compatibleBodies.some( const allBodiesAreCompatible = compatibleBodies.some(
(body) => body.representsAllBodies (body) => body.representsAllBodies,
); );
const compatibleBodyIds = compatibleBodies.map((body) => body.id); const compatibleBodyIds = compatibleBodies.map((body) => body.id);
@ -64,7 +68,7 @@ function SpeciesFacesPicker({
const allSpeciesFaces = DEFAULT_SPECIES_FACES.map((defaultSpeciesFace) => { const allSpeciesFaces = DEFAULT_SPECIES_FACES.map((defaultSpeciesFace) => {
const providedSpeciesFace = speciesFacesFromData.find( const providedSpeciesFace = speciesFacesFromData.find(
(f) => f.species.id === defaultSpeciesFace.speciesId (f) => f.species.id === defaultSpeciesFace.speciesId,
); );
if (providedSpeciesFace) { if (providedSpeciesFace) {
return { return {
@ -259,10 +263,10 @@ const SpeciesFaceOption = React.memo(
`} `}
> >
<CrossFadeImage <CrossFadeImage
src={`https://pets.neopets-asset-proxy.openneo.net/cp/${neopetsImageHash}/${emotionId}/1.png`} src={`https://pets.neopets.com/cp/${neopetsImageHash}/${emotionId}/1.png`}
srcSet={ srcSet={
`https://pets.neopets-asset-proxy.openneo.net/cp/${neopetsImageHash}/${emotionId}/1.png 1x, ` + `https://pets.neopets.com/cp/${neopetsImageHash}/${emotionId}/1.png 1x, ` +
`https://pets.neopets-asset-proxy.openneo.net/cp/${neopetsImageHash}/${emotionId}/6.png 2x` `https://pets.neopets.com/cp/${neopetsImageHash}/${emotionId}/6.png 2x`
} }
alt={speciesName} alt={speciesName}
width={55} width={55}
@ -320,7 +324,7 @@ const SpeciesFaceOption = React.memo(
)} )}
</ClassNames> </ClassNames>
); );
} },
); );
/** /**