From 7cc425649f10570943144055232e886aa530cfeb Mon Sep 17 00:00:00 2001 From: Tien Nam Dao Date: Wed, 12 Oct 2022 15:41:58 +0700 Subject: [PATCH 1/2] fix: display address balance_updated_at with NaN --- views/accounts/AddressOverview.tsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/views/accounts/AddressOverview.tsx b/views/accounts/AddressOverview.tsx index 2c0112be..1c1418e4 100644 --- a/views/accounts/AddressOverview.tsx +++ b/views/accounts/AddressOverview.tsx @@ -85,9 +85,14 @@ const AddressOverview = ({ address }: Props) => {
Last balance updated:
- - {addressBalance.lastBalanceUpdate} - + + {addressBalance.lastBalanceUpdate ? ( + + {addressBalance.lastBalanceUpdate} + + ) : ( + NaN + )}
From 338bf59da1fa64a7eb0f22fff54ece039f418cf7 Mon Sep 17 00:00:00 2001 From: Tien Nam Dao Date: Wed, 12 Oct 2022 16:15:28 +0700 Subject: [PATCH 2/2] feat: init page token --- pages/token/[token].tsx | 47 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/pages/token/[token].tsx b/pages/token/[token].tsx index e69de29b..e88d8980 100644 --- a/pages/token/[token].tsx +++ b/pages/token/[token].tsx @@ -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 => { + const { token } = props + + return ( + + + + + Token {token} - {process.env.NEXT_PUBLIC_TITLE} + + + + + + + ) +} + +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