feat: add community rule (#618)

* feat: add community rule

* fix: rename guideline to community rule
This commit is contained in:
SKINMAKER 2023-07-09 13:10:23 +09:00 committed by GitHub
parent b93199ed13
commit 0af48f1eb6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

37
pages/community-rule.tsx Normal file
View File

@ -0,0 +1,37 @@
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 CommunityRule: NextPage<CommunityRuleProps> = ({ content }) => {
return (
<Docs
header='커뮤니티 규칙'
description='한국 디스코드 리스트 커뮤니티 규칙입니다.'
>
<Markdown text={content} />
</Docs>
)
}
interface CommunityRuleProps {
content: string
}
export const getStaticProps: GetStaticProps<CommunityRuleProps> = async () => {
const res = await fetch(SpecialEndPoints.Github.Content('koreanbots', 'terms', 'community-rule.md'))
const json = await res.json()
return {
props: {
content: Buffer.from(json.content, 'base64').toString('utf-8')
}
}
}
export default CommunityRule