www/pages/index.tsx

35 lines
864 B
TypeScript
Raw Normal View History

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