import { gql, useQuery } from "@apollo/client";
import { useColorModeValue } from "@chakra-ui/color-mode";
import { QuestionIcon } from "@chakra-ui/icons";
import { Box, Flex, Wrap, WrapItem } from "@chakra-ui/layout";
import {
Popover,
PopoverArrow,
PopoverBody,
PopoverContent,
PopoverTrigger,
} from "@chakra-ui/popover";
import { Link } from "react-router-dom";
import HangerSpinner from "./components/HangerSpinner";
import { ErrorMessage, Heading1 } from "./util";
import useSupport from "./WardrobePage/support/useSupport";
function SupportPetAppearancesPage() {
const { isSupportUser } = useSupport();
if (!isSupportUser) {
return "Sorry, this page is only for Support users!";
}
return (
<>
Support: Pet appearances
These species/color combinations have some UNKNOWN
{" "}
appearances that need labeled! Please take a look!
This includes species/color combinations that have at least one{" "}
non-glitched UNKNOWN
pose, and still need a
non-glitched version of at least one of the standard 6
mood/gender-presentation poses.
>
);
}
function UnlabeledPetAppearancesList() {
const { loading, error, data } = useQuery(gql`
query SupportUnlabeledSpeciesColorPairs {
speciesColorPairsThatNeedSupportLabeling {
id
species {
id
name
}
color {
id
name
}
}
}
`);
if (loading) {
return (
);
}
if (error) {
return {error.message};
}
const speciesColorPairs = [
...data.speciesColorPairsThatNeedSupportLabeling,
].sort((a, b) =>
`${a.species.name} ${a.color.name}`.localeCompare(
`${b.species.name} ${b.color.name}`
)
);
if (speciesColorPairs.length === 0) {
return <>…never mind, they're all done! Wow, go team!! 🎉>;
}
return (
{speciesColorPairs.map(({ species, color }) => (
))}
);
}
function SpeciesColorEditorLink({ species, color }) {
const hoverBackgroundColor = useColorModeValue(
"blackAlpha.50",
"whiteAlpha.100"
);
return (
{color.name} {species.name}
);
}
export default SupportPetAppearancesPage;