Repository navigation
Expand file tree
/
Copy pathindex.page.tsx
More file actions
162 lines (149 loc) · 5.32 KB
/
Copy pathindex.page.tsx
File metadata and controls
162 lines (149 loc) · 5.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
import type { GetStaticProps, NextPage } from 'next'
import { useRouter } from 'next/router'
import Head from 'next/head'
import { Trans, useTranslation } from 'next-i18next'
import { BaseSeparatePage } from 'src/components/BaseSeparatePage'
import { StyledLink } from 'src/components/StyledLink'
import { REPO, fetchContributors, lastContributor, Author, LastAuthor, BASE_URL } from 'src/utils'
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
import Embellished from './embellished.svg'
import { useIsMobile } from '../../hooks'
import styles from './index.module.scss'
import { CkbPageFloatIconGroup } from './icons'
const pagePath = '/src/pages/ckbpage/index.page.tsx'
const pageLink = `https://github.com/${REPO}/blob/develop${pagePath}`
interface PageProps {
contributors: Array<Author>
author: LastAuthor | null
}
const CkbPage: NextPage<PageProps> = ({ contributors, author }) => {
const [t, { language }] = useTranslation(['ckbpage', 'common'])
const { pathname } = useRouter()
const isMobile = useIsMobile()
const floatIcons = (
<div className={styles.icons}>
<CkbPageFloatIconGroup />
</div>
)
const title = <div>{t('title')}</div>
const description = t('slogan')
const info = t('contribution_welcome', { ns: 'common' })
const functions = [
{
title: t('tokenomics.title'),
tags: ['TOKEN', 'SUPPLY', 'MINERS', 'REWARD', 'DAO'],
content: (
<>
<p>
<Trans t={t} i18nKey="tokenomics.description.text1">
The CKB token launched with an initial supply of 33.6 billion coins, 8.4 billion of which were burned soon
thereafter. The base issuance totals 33.6 billion coins and halves every four years until it hits
zero, whereas the fixed secondary issuance is 1.344 billion per year. Check out the detailed CKB supply structure
and issuance schedule
<StyledLink
href="https://medium.com/@m.quinn/a-detailed-description-of-nervos-ckb-supply-and-issuance-1d55c4b101f9"
colored
underline
>
here
</StyledLink>
.
</Trans>
</p>
<p>{t('tokenomics.description.text2')}</p>
<p>
<Trans t={t} i18nKey="tokenomics.description.text3">
CKB holders receive rewards from the secondary issuance by locking their coins in
the
<StyledLink href="https://medium.com/nervosnetwork/nervos-dao-explained-95e33898b1c" colored underline>
Nervos DAO
</StyledLink>
smart contract, which is a mechanism that incentivizes the removal of unnecessary data, ensuring long-term manageability of the blockchain.
</Trans>
</p>
</>
),
},
{
title: t('get_ckb.title'),
tags: ['EXCHANGES', 'WALLET'],
content: (
<>
<Trans t={t} i18nKey="get_ckb.description">
You can buy and sell CKB using the cryptocurrency exchanges on
<StyledLink href="https://www.coingecko.com/en/coins/nervos-network#markets" colored underline>
this list
</StyledLink>
. However, consider transferring and holding your CKB using a non-custodial cryptocurrency
<StyledLink href="/wallets" colored underline>
wallet
</StyledLink>
, as holding it on centralized exchanges is risky.
</Trans>
</>
),
},
]
const pageTitle = 'Nervos Network | CKB'
return (
<>
<Head>
<title>{pageTitle}</title>
</Head>
<BaseSeparatePage
embellishedElements={
isMobile
? [
{
content: <Embellished width={548} height={292} style={{ transform: 'rotateX(180deg)' }} />,
top: 453,
right: -8,
},
{ content: <Embellished width={548} height={292} />, top: 79, left: -55 },
]
: [
{
content: <Embellished width={940} height={503} style={{ transform: 'rotateX(180deg)' }} />,
top: 450,
right: 518,
},
{ content: <Embellished width={940} height={503} />, top: 382, left: 142 },
]
}
editLink={pageLink}
title={title}
floatIcons={floatIcons}
description={description}
info={info}
contributors={contributors}
author={author}
functions={functions}
openGraph={props => ({
...props,
type: 'website',
title: t('title'),
description: t('slogan'),
site_name: pageTitle,
url: `${BASE_URL}/${language}${pathname}`,
image: {
alt: 'coverImage',
url: `${BASE_URL}/images/topics/CKB.png`,
},
})}
/>
</>
)
}
export const getStaticProps: GetStaticProps = async ({ locale = 'en' }) => {
const contributors = await fetchContributors()
const author = await lastContributor(pagePath)
const lng = await serverSideTranslations(locale, ['common', 'ckbpage'])
return {
props: {
...lng,
author,
contributors,
},
}
}
export default CkbPage