open trading links in new page from wardrobe page
This commit is contained in:
parent
1af034e4e7
commit
9481ce05a6
1 changed files with 6 additions and 3 deletions
|
@ -84,7 +84,7 @@ export function ItemPageContent({ itemId, isEmbedded }) {
|
|||
/>
|
||||
<VStack spacing="4">
|
||||
{isLoggedIn && <ItemPageOwnWantButtons itemId={itemId} />}
|
||||
<ItemPageTradeLinks itemId={itemId} />
|
||||
<ItemPageTradeLinks itemId={itemId} isEmbedded={isEmbedded} />
|
||||
</VStack>
|
||||
{!isEmbedded && <ItemPageOutfitPreview itemId={itemId} />}
|
||||
</VStack>
|
||||
|
@ -358,7 +358,7 @@ function ItemPageWantButton({ itemId, isChecked }) {
|
|||
);
|
||||
}
|
||||
|
||||
function ItemPageTradeLinks({ itemId }) {
|
||||
function ItemPageTradeLinks({ itemId, isEmbedded }) {
|
||||
const { data, loading, error } = useQuery(
|
||||
gql`
|
||||
query ItemPageTradeLinks($itemId: ID!) {
|
||||
|
@ -387,6 +387,7 @@ function ItemPageTradeLinks({ itemId }) {
|
|||
count={data?.item?.numUsersOfferingThis || 0}
|
||||
label="offering"
|
||||
colorScheme="green"
|
||||
isEmbedded={isEmbedded}
|
||||
/>
|
||||
</SubtleSkeleton>
|
||||
<SubtleSkeleton isLoaded={!loading}>
|
||||
|
@ -395,18 +396,20 @@ function ItemPageTradeLinks({ itemId }) {
|
|||
count={data?.item?.numUsersSeekingThis || 0}
|
||||
label="seeking"
|
||||
colorScheme="blue"
|
||||
isEmbedded={isEmbedded}
|
||||
/>
|
||||
</SubtleSkeleton>
|
||||
</HStack>
|
||||
);
|
||||
}
|
||||
|
||||
function ItemPageTradeLink({ itemId, count, label, colorScheme }) {
|
||||
function ItemPageTradeLink({ itemId, count, label, colorScheme, isEmbedded }) {
|
||||
return (
|
||||
<Button
|
||||
as="a"
|
||||
// TODO: Link to a new Impress 2020 page instead!
|
||||
href={`https://impress.openneo.net/items/${itemId}`}
|
||||
target={isEmbedded ? "_blank" : undefined}
|
||||
size="xs"
|
||||
variant="outline"
|
||||
colorScheme={colorScheme}
|
||||
|
|
Loading…
Reference in a new issue