Oops, show models needed for special colors

Right, oops, `speciesThatNeedModels` is for standard colors! Add in the special colors, too!
This commit is contained in:
Emi Matchu 2021-07-17 05:47:32 -07:00
parent f1d24d2177
commit b7b4fa21ec

View file

@ -386,6 +386,18 @@ function NewItemsSectionContent() {
id id
name name
} }
babySpeciesThatNeedModels: speciesThatNeedModels(colorId: "6") {
id
name
}
maraquanSpeciesThatNeedModels: speciesThatNeedModels(colorId: "44") {
id
name
}
mutantSpeciesThatNeedModels: speciesThatNeedModels(colorId: "46") {
id
name
}
compatibleBodiesAndTheirZones { compatibleBodiesAndTheirZones {
body { body {
id id
@ -492,10 +504,16 @@ function ItemModelingSummary({ item }) {
// NOTE: To test this logic, I like to swap out `newestItems` in the query: // NOTE: To test this logic, I like to swap out `newestItems` in the query:
// `newestItems: items(ids: ["81546", "35082", "75149", "81797", "58741", "78953", "82427", "82727", "82726"])` // `newestItems: items(ids: ["81546", "35082", "75149", "81797", "58741", "78953", "82427", "82727", "82726"])`
if (item.speciesThatNeedModels.length > 0) { const numModelsNeeded =
item.speciesThatNeedModels.length +
item.babySpeciesThatNeedModels.length +
item.maraquanSpeciesThatNeedModels.length +
item.mutantSpeciesThatNeedModels.length;
if (numModelsNeeded > 0) {
return ( return (
<Box fontSize="xs" fontStyle="italic" fontWeight="600" opacity="0.8"> <Box fontSize="xs" fontStyle="italic" fontWeight="600" opacity="0.8">
Need {item.speciesThatNeedModels.length} models Need {numModelsNeeded} models
</Box> </Box>
); );
} }