core/pages/guidelines.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

35 lines
899 B
TypeScript

import { GetStaticProps, NextPage } from 'next'
import dynamic from 'next/dynamic'
import { SpecialEndPoints } from '@utils/Constants'
const Docs = dynamic(() => import('@components/Docs'))
const Markdown = dynamic(() => import('@components/Markdown'))
const Guidelines: NextPage<GuidelinesProps> = ({ content }) => {
return (
<Docs
header='가이드라인'
description='리스트에 등재되는 모든 봇들이 지켜야하는 가이드라인입니다!'
>
<Markdown text={content} />
</Docs>
)
}
interface GuidelinesProps {
content: string
}
export const getStaticProps: GetStaticProps<GuidelinesProps> = async () => {
const res = await fetch(SpecialEndPoints.Github.Content('koreanbots', 'terms', 'guidelines.md'))
const json = await res.json()
return {
props: {
content: Buffer.from(json.content, 'base64').toString('utf-8'),
},
}
}
export default Guidelines