mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-03 22:47:15 +01:00
25 lines
647 B
TypeScript
25 lines
647 B
TypeScript
import { readFileSync } from 'fs'
|
|
import renderToString from 'next-mdx-remote/render-to-string'
|
|
import mdFormatter from '../helpers/mdFormatter'
|
|
|
|
import Layout from '../components/layout'
|
|
|
|
export default function TermsPage({ renderedOutput }) {
|
|
return (
|
|
<Layout>
|
|
<div
|
|
className="text-gray-700"
|
|
dangerouslySetInnerHTML={{ __html: renderedOutput }}
|
|
/>
|
|
</Layout>
|
|
)
|
|
}
|
|
|
|
export async function getStaticProps() {
|
|
const source = readFileSync('./md/impressum.md', 'utf8')
|
|
const { renderedOutput } = await renderToString(source, {
|
|
components: { ...mdFormatter },
|
|
})
|
|
return { props: { renderedOutput } }
|
|
}
|