Files
blog/src/app/page.tsx
T
naomi 2de1f4e36e
Code Analysis / SonarQube (push) Failing after 16s
Node.js CI / Lint and Test (push) Successful in 1m33s
fix: dedupe read time
2025-10-29 14:49:11 -07:00

35 lines
1.0 KiB
TypeScript

/**
* @copyright nhcarrigan
* @license Naomi's Public License
* @author Naomi Carrigan
*/
import type { JSX } from "react";
import { Rule } from "@/components/rule";
import { getSortedPostsData } from "@/lib/posts";
/**
* Renders the home page.
* @returns JSX component.
*/
const Home = (): JSX.Element => {
const posts = getSortedPostsData();
return (
<main>
<h1>{"Blog"}</h1>
<p className="text-center text-xl">{"Welcome to the musings of a transfem software engineer!"}</p>
{posts.map((post) => {
return <div key={post.slug}>
<Rule />
<h2><a className="underline" href={`/post/${post.slug}`}>{post.data.title}</a></h2>
<p className="italic text-center">{post.data.date.toLocaleDateString("en-GB", { day: "numeric", month: "long", year: "numeric" })}</p>
<p className="text-center">{post.data.summary}</p>
<p className="text-center">{`A ${post.data.readtime}.`}</p>
</div>;
})}
</main>
);
};
export default Home;