mirror of
https://github.com/koreanbots/core.git
synced 2025-12-16 06:20:24 +00:00
feat: add community rule (#618)
* feat: add community rule * fix: rename guideline to community rule
This commit is contained in:
parent
b93199ed13
commit
0af48f1eb6
37
pages/community-rule.tsx
Normal file
37
pages/community-rule.tsx
Normal 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
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user