Skip to content

Commit

Permalink
Show NFT instance details sections
Browse files Browse the repository at this point in the history
  • Loading branch information
csillag authored and buberdds committed Nov 28, 2023
1 parent 56bb16e commit bf47a6d
Showing 1 changed file with 25 additions and 2 deletions.
27 changes: 25 additions & 2 deletions src/app/pages/NFTInstanceDashboardPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ import { FC } from 'react'
import { useParams } from 'react-router-dom'
import { useRequiredScopeParam } from '../../hooks/useScopeParam'
import { PageLayout } from '../../components/PageLayout'
import { Layer } from '../../../oasis-nexus/api'
import { InstanceTitleCard } from './InstanceTitleCard'
import { InstanceDetailsCard } from './InstanceDetailsCard'
import { InstanceImageCard } from './InstanceImageCard'
import { Layer, Runtime, useGetRuntimeEvmTokensAddressNftsId } from '../../../oasis-nexus/api'
import { AppErrors } from '../../../types/errors'

export const NFTInstanceDashboardPage: FC = () => {
Expand All @@ -17,5 +20,25 @@ export const NFTInstanceDashboardPage: FC = () => {
throw AppErrors.InvalidUrl
}

return <PageLayout />
const { data, isFetched, isLoading } = useGetRuntimeEvmTokensAddressNftsId(
scope.network,
scope.layer as Runtime,
address,
instanceId,
)
const nft = data?.data

return (
<PageLayout>
<InstanceTitleCard isFetched={isFetched} isLoading={isLoading} nft={nft} scope={scope} />
<InstanceImageCard isFetched={isFetched} isLoading={isLoading} nft={nft} />
<InstanceDetailsCard
isFetched={isFetched}
isLoading={isLoading}
nft={nft}
scope={scope}
contractAddress={address!}
/>
</PageLayout>
)
}

0 comments on commit bf47a6d

Please sign in to comment.