add NC badges to modeling page

This commit is contained in:
Emi Matchu 2020-09-15 04:31:27 -07:00
parent c9f7f7a6bb
commit ec0b80c0ca

View file

@ -9,6 +9,7 @@ import { Heading1, Heading2, usePageTitle } from "./util";
import ItemCard, { import ItemCard, {
ItemBadgeList, ItemBadgeList,
ItemCardList, ItemCardList,
NcBadge,
YouOwnThisBadge, YouOwnThisBadge,
} from "./components/ItemCard"; } from "./components/ItemCard";
@ -69,6 +70,7 @@ function ItemModelsSection() {
id id
name name
thumbnailUrl thumbnailUrl
isNc
createdAt createdAt
} }
`); `);
@ -167,8 +169,9 @@ function ItemModelCard({ item, currentUserOwnsItem, ...props }) {
function ItemModelBadges({ item, currentUserOwnsItem }) { function ItemModelBadges({ item, currentUserOwnsItem }) {
return ( return (
<ItemBadgeList> <ItemBadgeList>
{currentUserOwnsItem && <YouOwnThisBadge />}
{itemIsNew(item) && <NewItemBadge createdAt={item.createdAt} />} {itemIsNew(item) && <NewItemBadge createdAt={item.createdAt} />}
{item.isNc && <NcBadge />}
{currentUserOwnsItem && <YouOwnThisBadge />}
{item.speciesThatNeedModels.map((species) => ( {item.speciesThatNeedModels.map((species) => (
<Badge>{species.name}</Badge> <Badge>{species.name}</Badge>
))} ))}