swap own badge and want badge

This commit is contained in:
Emi Matchu 2020-10-27 21:43:57 -07:00
parent 444887b64f
commit 3ce5e74b09

View file

@ -135,20 +135,11 @@ function UserItemsPage() {
Neomail Neomail
</Badge> </Badge>
)} )}
{numYouOwnThisBadges > 0 && ( {/* Usually I put "Own" before "Want", but this matches the natural
<Badge * order on the page: the _matches_ for things you want are things
as="a" * _this user_ owns, so they come first. I think it's also probably a
href="#wanted-items" * more natural train of thought: you come to someone's list _wanting_
colorScheme="green" * something, and _then_ thinking about what you can offer. */}
display="flex"
alignItems="center"
>
<CheckIcon marginRight="1" />
{numYouOwnThisBadges > 1
? `${numYouOwnThisBadges} items you own`
: "1 item you own"}
</Badge>
)}
{numYouWantThisBadges > 0 && ( {numYouWantThisBadges > 0 && (
<Badge <Badge
as="a" as="a"
@ -163,6 +154,20 @@ function UserItemsPage() {
: "1 item you want"} : "1 item you want"}
</Badge> </Badge>
)} )}
{numYouOwnThisBadges > 0 && (
<Badge
as="a"
href="#wanted-items"
colorScheme="green"
display="flex"
alignItems="center"
>
<CheckIcon marginRight="1" />
{numYouOwnThisBadges > 1
? `${numYouOwnThisBadges} items you own`
: "1 item you own"}
</Badge>
)}
</Wrap> </Wrap>
<Heading2 id="owned-items" marginTop="4" marginBottom="6"> <Heading2 id="owned-items" marginTop="4" marginBottom="6">
{isCurrentUser ? "Items you own" : `Items ${data.user.username} owns`} {isCurrentUser ? "Items you own" : `Items ${data.user.username} owns`}