mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-03 22:47:15 +01:00
25 lines
626 B
TypeScript
25 lines
626 B
TypeScript
import { readFileSync } from 'fs'
|
|
|
|
import { serialize } from 'next-mdx-remote/serialize'
|
|
import { MDXRemote } from 'next-mdx-remote'
|
|
|
|
import mdComponents from '../components/mdComponents'
|
|
|
|
import Layout from '../components/layout'
|
|
|
|
export default function TermsPage({ source }) {
|
|
return (
|
|
<Layout>
|
|
<div className="text-gray-700" >
|
|
<MDXRemote {...source} components={{...mdComponents}} />
|
|
</div>
|
|
</Layout>
|
|
)
|
|
}
|
|
|
|
export async function getStaticProps() {
|
|
const source = readFileSync('./md/terms.md', 'utf8')
|
|
const mdxSource = await serialize(source)
|
|
return { props: { source: mdxSource } }
|
|
}
|