2021-12-08 03:38:31 +00:00
|
|
|
import React from 'react';
|
|
|
|
import Layout from '../components/layout';
|
2022-04-28 01:55:18 +00:00
|
|
|
import QuickLinks from '../components/quick-links';
|
|
|
|
import RecentPosts from '../components/recent-posts';
|
2022-04-27 08:03:21 +00:00
|
|
|
import { getPostsMeta, PostMeta } from '../util/slug';
|
2021-12-08 03:38:31 +00:00
|
|
|
|
2022-04-28 01:55:18 +00:00
|
|
|
function HomePage({ postsMeta }: { postsMeta: PostMeta[] }) {
|
2021-12-08 03:38:31 +00:00
|
|
|
return (
|
|
|
|
<Layout name='' title='PaulW.XYZ'>
|
2022-02-14 20:32:58 +00:00
|
|
|
<section className='block'>
|
2022-04-28 01:55:18 +00:00
|
|
|
<QuickLinks />
|
2021-12-08 03:38:31 +00:00
|
|
|
</section>
|
2022-02-14 20:32:58 +00:00
|
|
|
<section className='block'>
|
2022-04-28 01:55:18 +00:00
|
|
|
<RecentPosts postsMeta={postsMeta} />
|
2022-02-14 20:32:58 +00:00
|
|
|
</section>
|
2021-12-08 03:38:31 +00:00
|
|
|
</Layout>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
2022-04-27 10:39:10 +00:00
|
|
|
export async function getStaticProps() {
|
2022-04-27 08:03:21 +00:00
|
|
|
return {
|
|
|
|
props: { postsMeta: getPostsMeta() }
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2022-02-14 20:32:58 +00:00
|
|
|
export default HomePage;
|