fix: a few bugs on details (#5386)

* fix: a few bugs on details

* no seller if no owner

* removing seller for erc1155
This commit is contained in:
Jack Short 2022-11-23 12:55:13 -05:00 committed by GitHub
parent 5dce68a62f
commit 940c1dbb8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 4 deletions

@ -96,6 +96,7 @@ const MarketplaceIcon = styled.img`
` `
const BuyNowButton = styled.div<{ assetInBag: boolean; margin: boolean; useAccentColor: boolean }>` const BuyNowButton = styled.div<{ assetInBag: boolean; margin: boolean; useAccentColor: boolean }>`
position: relative;
width: 100%; width: 100%;
background-color: ${({ theme, assetInBag, useAccentColor }) => background-color: ${({ theme, assetInBag, useAccentColor }) =>
assetInBag ? theme.accentFailure : useAccentColor ? theme.accentAction : theme.backgroundInteractive}; assetInBag ? theme.accentFailure : useAccentColor ? theme.accentAction : theme.backgroundInteractive};
@ -393,9 +394,11 @@ export const AssetPriceDetails = ({ asset, collection }: AssetPriceDetailsProps)
)} )}
{isForSale && ( {isForSale && (
<OwnerInformationContainer> <OwnerInformationContainer>
{asset.tokenType !== 'ERC1155' && asset.owner.address && (
<ThemedText.BodySmall color="textSecondary" lineHeight="20px"> <ThemedText.BodySmall color="textSecondary" lineHeight="20px">
Seller: Seller:
</ThemedText.BodySmall> </ThemedText.BodySmall>
)}
<OwnerText <OwnerText
target="_blank" target="_blank"
href={`https://etherscan.io/address/${asset.owner.address}`} href={`https://etherscan.io/address/${asset.owner.address}`}

@ -31,7 +31,7 @@ export const getMarketplaceIcon = (marketplace: string) => {
export const generateTweetForAsset = (asset: GenieAsset): string => { export const generateTweetForAsset = (asset: GenieAsset): string => {
return `https://twitter.com/intent/tweet?text=Check%20out%20${ return `https://twitter.com/intent/tweet?text=Check%20out%20${
asset.name ?? `${asset.collectionName}%20%23${asset.tokenId}` asset.name ? encodeURIComponent(asset.name) : `${asset.collectionName}%20%23${asset.tokenId}`
}%20(${asset.collectionName})%20https://app.uniswap.org/%23/nfts/asset/${asset.address}/${ }%20(${asset.collectionName})%20https://app.uniswap.org/%23/nfts/asset/${asset.address}/${
asset.tokenId asset.tokenId
}%20via%20@uniswap` }%20via%20@uniswap`