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
1.6 KiB

{"ast":null,"code":"import React from \"react\";\nvar __jsx = React.createElement;\nimport Head from \"next/head\";\nimport Layout, { siteTitle } from \"../components/layout\";\nimport utilStyles from \"../styles/utils.module.css\";\nimport { getSortedPostsData } from \"../lib/posts\";\nimport Link from \"next/link\";\nimport Date from \"../components/date\";\nexport default function Home({\n allPostsData\n}) {\n return __jsx(Layout, {\n home: true\n }, __jsx(Head, null, __jsx(\"title\", null, siteTitle)), __jsx(\"section\", {\n className: utilStyles.headingMd\n }, __jsx(\"p\", null, \"[Your Self Introduction]\"), __jsx(\"p\", null, \"(This is a sample website - you\\u2019ll be building a site like this in\", \" \", __jsx(\"a\", {\n href: \"https://nextjs.org/learn\"\n }, \"our Next.js tutorial\"), \".)\")), __jsx(\"section\", {\n className: `${utilStyles.headingMd} ${utilStyles.padding1px}`\n }, __jsx(\"h2\", {\n className: utilStyles.headingLg\n }, \"Blog\"), __jsx(\"ul\", {\n className: utilStyles.list\n }, allPostsData.map(({\n id,\n date,\n title\n }) => __jsx(\"li\", {\n className: utilStyles.listItem,\n key: id\n }, __jsx(Link, {\n href: \"/posts/[id]\",\n as: `/posts/${id}`\n }, __jsx(\"a\", null, title)), __jsx(\"br\", null), __jsx(\"small\", {\n className: utilStyles.lightText\n }, __jsx(Date, {\n dateString: date\n })))))));\n}\nexport const getServerSideProps = async () => {\n const allPostsData = getSortedPostsData();\n return {\n props: {\n allPostsData\n }\n };\n};","map":null,"metadata":{},"sourceType":"module"}