Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add community rule #618

Merged
merged 2 commits into from
Jul 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions pages/community-rule.tsx
Original file line number Diff line number Diff line change
@@ -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