Skip to content

Commit 338bf59

Browse files
author
Tien Nam Dao
committed
feat: init page token
1 parent 7cc4256 commit 338bf59

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

pages/token/[token].tsx

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
import { Breadcumbs } from '@astraprotocol/astra-ui'
2+
import Container from 'components/Container'
3+
import Head from 'next/head'
4+
import React from 'react'
5+
import { LinkMaker } from 'utils/helper'
6+
import Layout from '../../components/Layout'
7+
8+
type Props = {
9+
token: string
10+
}
11+
12+
const TokenDetailPage: React.FC<Props> = props => {
13+
const { token } = props
14+
15+
return (
16+
<Layout>
17+
<Head>
18+
<meta name="viewport" content="initial-scale=1.0, width=device-width" />
19+
<title>
20+
Token {token} - {process.env.NEXT_PUBLIC_TITLE}
21+
</title>
22+
</Head>
23+
<Container>
24+
<Breadcumbs items={[{ label: 'Address', link: LinkMaker.token() }, { label: '' }]} />
25+
</Container>
26+
</Layout>
27+
)
28+
}
29+
30+
export async function getServerSideProps({ params }) {
31+
const { token } = params
32+
// if (web3.utils.isAddress(address))
33+
return {
34+
props: {
35+
token
36+
}
37+
}
38+
39+
// return {
40+
// redirect: {
41+
// destination: '/404',
42+
// permanent: false
43+
// }
44+
// }
45+
}
46+
47+
export default TokenDetailPage

0 commit comments

Comments
 (0)