www/pages/index.tsx

35 lines
723 B
TypeScript
Raw Normal View History

2021-12-07 22:38:31 -05:00
import React from 'react';
2022-10-04 23:41:59 -04:00
import Link from 'next/link';
2021-12-07 22:38:31 -05:00
import Layout from '../components/layout';
2022-04-27 21:55:18 -04:00
import QuickLinks from '../components/quick-links';
2022-04-28 12:37:12 -04:00
import RecentNotes from '../components/recent-notes';
2022-04-27 21:55:18 -04:00
import RecentPosts from '../components/recent-posts';
import RootInfo from '../public/home.json';
2021-12-07 22:38:31 -05:00
2022-10-04 23:41:59 -04:00
function Nav() {
const nav = Object.entries(RootInfo);
return (
<div className='block'>
<h2>Navigation</h2>
{
nav.map(([slug, info]) => {
return <Link key={slug} href={slug} className='button green'>{info.title}</Link>
})
}
</div>
)
2022-10-04 23:41:59 -04:00
}
function HomePage() {
return (
<Layout>
<QuickLinks />
<RecentPosts />
<RecentNotes />
<Nav />
</Layout>
)
2021-12-07 22:38:31 -05:00
}
export default HomePage;