import Link from 'next/link'; import React from 'react'; import Layout from '../components/layout'; import Pages from '../public/pages.json'; import Posts from '../public/posts.json'; import style from '../styles/home.module.css'; import prettyDatePrint from '../util/pretty-date'; function HomePage({ posts }: any) { Pages.sort((x, y) => { return (x.title).localeCompare(y.title) }); return (
Welcome!
{ Pages.map(obj => { return {obj.title} }) }
{Posts?.map((post: any) => { return })}
Posts Posted
{post.title} {prettyDatePrint(new Date(post.created_at))}
) } export default HomePage;