Commit ac1e83ea authored by unipadmini's avatar unipadmini Committed by GitHub

fix: Collection name should link to collection page. (#5198)

Co-authored-by: default avatarPadmini Pyapali <padminipyapali@Padminis-MacBook-Pro.local>
parent 62159117
...@@ -7,7 +7,7 @@ import { ethNumberStandardFormatter, formatEthPrice, getMarketplaceIcon, timeLef ...@@ -7,7 +7,7 @@ import { ethNumberStandardFormatter, formatEthPrice, getMarketplaceIcon, timeLef
import { shortenAddress } from 'nft/utils/address' import { shortenAddress } from 'nft/utils/address'
import { useMemo } from 'react' import { useMemo } from 'react'
import { Upload } from 'react-feather' import { Upload } from 'react-feather'
import { useNavigate } from 'react-router-dom' import { Link, useNavigate } from 'react-router-dom'
import styled, { css, useTheme } from 'styled-components/macro' import styled, { css, useTheme } from 'styled-components/macro'
import { ThemedText } from 'theme' import { ThemedText } from 'theme'
...@@ -257,7 +257,7 @@ export const OwnerContainer = ({ asset }: { asset: GenieAsset }) => { ...@@ -257,7 +257,7 @@ export const OwnerContainer = ({ asset }: { asset: GenieAsset }) => {
) )
} }
export const NotForSale = ({ collection }: { collection: CollectionInfoForAsset }) => { export const NotForSale = ({ collectionName, collectionUrl }: { collectionName: string; collectionUrl: string }) => {
const theme = useTheme() const theme = useTheme()
return ( return (
...@@ -271,7 +271,9 @@ export const NotForSale = ({ collection }: { collection: CollectionInfoForAsset ...@@ -271,7 +271,9 @@ export const NotForSale = ({ collection }: { collection: CollectionInfoForAsset
<ThemedText.BodySecondary fontSize="14px" lineHeight="20px"> <ThemedText.BodySecondary fontSize="14px" lineHeight="20px">
Discover similar NFTs for sale in Discover similar NFTs for sale in
</ThemedText.BodySecondary> </ThemedText.BodySecondary>
<ThemedText.Link lineHeight="20px">{collection.collectionName}</ThemedText.Link> <Link to={`/nfts/collection/${collectionUrl}`}>
<ThemedText.Link lineHeight="20px">{collectionName}</ThemedText.Link>
</Link>
</DiscoveryContainer> </DiscoveryContainer>
</NotForSaleContainer> </NotForSaleContainer>
</BestPriceContainer> </BestPriceContainer>
...@@ -401,7 +403,7 @@ export const AssetPriceDetails = ({ asset, collection }: AssetPriceDetailsProps) ...@@ -401,7 +403,7 @@ export const AssetPriceDetails = ({ asset, collection }: AssetPriceDetailsProps)
</div> </div>
</BestPriceContainer> </BestPriceContainer>
) : ( ) : (
<NotForSale collection={collection} /> <NotForSale collectionName={collection.collectionName ?? 'this collection'} collectionUrl={asset.address} />
)} )}
</Container> </Container>
) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment