Second frontend, written in Next.JS + Typescript.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

1 lines
996 B

{"ast":null,"code":"import React from \"react\";\nvar __jsx = React.createElement;\nimport Head from \"next/head\";\nimport Layout from \"../../components/layout\";\nimport Date from \"../../components/date\";\nimport { getPostData } from \"../../lib/posts\";\nimport utilStyles from \"../../styles/utils.module.css\";\nexport default function Post({\n postData\n}) {\n return __jsx(Layout, null, __jsx(Head, null, __jsx(\"title\", null, postData.title)), __jsx(\"article\", null, __jsx(\"h1\", {\n className: utilStyles.headingXl\n }, postData.title), __jsx(\"div\", {\n className: utilStyles.lightText\n }, __jsx(Date, {\n dateString: postData.date\n })), __jsx(\"div\", {\n dangerouslySetInnerHTML: {\n __html: postData.contentHtml\n }\n })));\n}\nexport const getServerSideProps = async ({\n params\n}) => {\n const postData = await getPostData(params.id);\n return {\n props: {\n postData\n }\n };\n};","map":null,"metadata":{},"sourceType":"module"}