link to the new trade pages from item page

This commit is contained in:
Emi Matchu 2020-11-24 15:01:24 -08:00
parent 1f2e83e11e
commit ec9b96ff70

View file

@ -383,7 +383,7 @@ function ItemPageTradeLinks({ itemId, isEmbedded }) {
</Box> </Box>
<SubtleSkeleton isLoaded={!loading}> <SubtleSkeleton isLoaded={!loading}>
<ItemPageTradeLink <ItemPageTradeLink
itemId={itemId} href={`/items/${itemId}/trades/offering`}
count={data?.item?.numUsersOfferingThis || 0} count={data?.item?.numUsersOfferingThis || 0}
label="offering" label="offering"
colorScheme="green" colorScheme="green"
@ -392,7 +392,7 @@ function ItemPageTradeLinks({ itemId, isEmbedded }) {
</SubtleSkeleton> </SubtleSkeleton>
<SubtleSkeleton isLoaded={!loading}> <SubtleSkeleton isLoaded={!loading}>
<ItemPageTradeLink <ItemPageTradeLink
itemId={itemId} href={`/items/${itemId}/trades/seeking`}
count={data?.item?.numUsersSeekingThis || 0} count={data?.item?.numUsersSeekingThis || 0}
label="seeking" label="seeking"
colorScheme="blue" colorScheme="blue"
@ -403,12 +403,11 @@ function ItemPageTradeLinks({ itemId, isEmbedded }) {
); );
} }
function ItemPageTradeLink({ itemId, count, label, colorScheme, isEmbedded }) { function ItemPageTradeLink({ href, count, label, colorScheme, isEmbedded }) {
return ( return (
<Button <Button
as="a" as="a"
// TODO: Link to a new Impress 2020 page instead! href={href}
href={`https://impress.openneo.net/items/${itemId}`}
target={isEmbedded ? "_blank" : undefined} target={isEmbedded ? "_blank" : undefined}
size="xs" size="xs"
variant="outline" variant="outline"