Skip to content

Commit

Permalink
Merge branches 'dev' and 'feat/asa-160-tokens-holders' of https://git…
Browse files Browse the repository at this point in the history
  • Loading branch information
Tien Nam Dao committed Oct 12, 2022
2 parents 2546368 + 338bf59 commit 3572f61
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 3 deletions.
47 changes: 47 additions & 0 deletions pages/token/[token].tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import { Breadcumbs } from '@astraprotocol/astra-ui'
import Container from 'components/Container'
import Head from 'next/head'
import React from 'react'
import { LinkMaker } from 'utils/helper'
import Layout from '../../components/Layout'

type Props = {
token: string
}

const TokenDetailPage: React.FC<Props> = props => {
const { token } = props

return (
<Layout>
<Head>
<meta name="viewport" content="initial-scale=1.0, width=device-width" />
<title>
Token {token} - {process.env.NEXT_PUBLIC_TITLE}
</title>
</Head>
<Container>
<Breadcumbs items={[{ label: 'Address', link: LinkMaker.token() }, { label: '' }]} />
</Container>
</Layout>
)
}

export async function getServerSideProps({ params }) {
const { token } = params
// if (web3.utils.isAddress(address))
return {
props: {
token
}
}

// return {
// redirect: {
// destination: '/404',
// permanent: false
// }
// }
}

export default TokenDetailPage
11 changes: 8 additions & 3 deletions views/accounts/AddressOverview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,14 @@ const AddressOverview = ({ address }: Props) => {
<div className="">
<span className="text text-base contrast-color-50">Last balance updated:</span>
<br />
<LinkText href={LinkMaker.block(addressBalance.lastBalanceUpdate)}>
{addressBalance.lastBalanceUpdate}
</LinkText>

{addressBalance.lastBalanceUpdate ? (
<LinkText href={LinkMaker.block(addressBalance.lastBalanceUpdate)}>
{addressBalance.lastBalanceUpdate}
</LinkText>
) : (
<span className="text text-base">NaN</span>
)}
</div>
</Row>
</BackgroundCard>
Expand Down

0 comments on commit 3572f61

Please sign in to comment.