core/pages/verification.tsx
SKINMAKER b421d1ab64
chore: apply prettier (#637)
* chore: apply prettier

* chore: edit ready comment

* chore: move ts comment
2023-11-29 22:04:33 +09:00

46 lines
1.3 KiB
TypeScript

import { GetStaticProps, NextPage } from 'next'
import dynamic from 'next/dynamic'
import { SpecialEndPoints } from '@utils/Constants'
const Button = dynamic(() => import('@components/Button'))
const Divider = dynamic(() => import('@components/Divider'))
const Docs = dynamic(() => import('@components/Docs'))
const Markdown = dynamic(() => import('@components/Markdown'))
const Verification: NextPage<VerificationProps> = ({ content }) => {
return (
<Docs
header='인증'
description='한국 디스코드 리스트의 신뢰된 봇은 디스코드 인증보다 더 자세한 기준으로 신뢰성을 주기 위한 제도입니다.'
>
<Markdown text={content} />
<Divider />
<div className='pt-10 text-center'>
<h2 className='mb-6 text-2xl font-bold'> </h2>
<Button href='https://github.com/koreanbots/verification'>
<i className='fab fa-github' />
</Button>
</div>
</Docs>
)
}
interface VerificationProps {
content: string
}
export const getStaticProps: GetStaticProps<VerificationProps> = async () => {
const res = await fetch(
SpecialEndPoints.Github.Content('koreanbots', 'verification', 'README.md')
)
const json = await res.json()
return {
props: {
content: Buffer.from(json.content, 'base64').toString('utf-8'),
},
}
}
export default Verification