Commit 19bb92bc authored by tom's avatar tom

add registration date and wrapped owner to domain details page

parent a73f6aa3
...@@ -28,6 +28,18 @@ const NameDomainDetails = ({ query }: Props) => { ...@@ -28,6 +28,18 @@ const NameDomainDetails = ({ query }: Props) => {
return ( return (
<Grid columnGap={ 8 } rowGap={ 3 } templateColumns={{ base: 'minmax(0, 1fr)', lg: 'max-content minmax(728px, auto)' }}> <Grid columnGap={ 8 } rowGap={ 3 } templateColumns={{ base: 'minmax(0, 1fr)', lg: 'max-content minmax(728px, auto)' }}>
{ query.data?.registration_date && (
<DetailsInfoItem
title="Registration date"
hint="The date the name was registered"
isLoading={ isLoading }
>
<IconSvg name="clock" boxSize={ 5 } color="gray.500" verticalAlign="middle" isLoading={ isLoading } mr={ 2 }/>
<Skeleton isLoaded={ !isLoading } display="inline" whiteSpace="pre-wrap" lineHeight="20px">
{ dayjs(query.data.registration_date).format('llll') }
</Skeleton>
</DetailsInfoItem>
) }
{ query.data?.expiry_date && ( { query.data?.expiry_date && (
<DetailsInfoItem <DetailsInfoItem
title="Expiration date" title="Expiration date"
...@@ -36,9 +48,7 @@ const NameDomainDetails = ({ query }: Props) => { ...@@ -36,9 +48,7 @@ const NameDomainDetails = ({ query }: Props) => {
isLoading={ isLoading } isLoading={ isLoading }
display="inline-block" display="inline-block"
> >
<Skeleton isLoaded={ !isLoading } display="inline" mr={ 2 } mt="-2px" > <IconSvg name="clock" boxSize={ 5 } color="gray.500" verticalAlign="middle" isLoading={ isLoading } mr={ 2 } mt="-2px"/>
<IconSvg name="clock" boxSize={ 5 } color="gray.500"verticalAlign="middle"/>
</Skeleton>
{ hasExpired && ( { hasExpired && (
<> <>
<Skeleton isLoaded={ !isLoading } display="inline" whiteSpace="pre-wrap" lineHeight="24px"> <Skeleton isLoaded={ !isLoading } display="inline" whiteSpace="pre-wrap" lineHeight="24px">
...@@ -102,6 +112,29 @@ const NameDomainDetails = ({ query }: Props) => { ...@@ -102,6 +112,29 @@ const NameDomainDetails = ({ query }: Props) => {
</Tooltip> </Tooltip>
</DetailsInfoItem> </DetailsInfoItem>
) } ) }
{ query.data?.wrapped_owner && (
<DetailsInfoItem
title="Wrapped controller"
hint="Owner of this NFT domain in NameWrapper contract"
isLoading={ isLoading }
columnGap={ 2 }
flexWrap="nowrap"
>
<AddressEntity
address={ query.data.wrapped_owner }
isLoading={ isLoading }
/>
<Tooltip label="Lookup for related domain names">
<LinkInternal
flexShrink={ 0 }
display="inline-flex"
href={ route({ pathname: '/name-domains', query: { owned_by: 'true', resolved_to: 'true', address: query.data.wrapped_owner.hash } }) }
>
<IconSvg name="search" boxSize={ 5 } isLoading={ isLoading }/>
</LinkInternal>
</Tooltip>
</DetailsInfoItem>
) }
<DetailsInfoItem <DetailsInfoItem
title="Token ID" title="Token ID"
hint="The Token ID of this domain name NFT" hint="The Token ID of this domain name NFT"
......
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