diff --git a/app/page.tsx b/app/page.tsx index 9f3cfbb..0b7532d 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -2,11 +2,18 @@ import { getSortedPostsData, PostMeta } from "../lib/posts"; import Link from "next/link"; import Window from "../components/window"; +function isNew(dateStr: string): boolean { + const postDate = new Date(dateStr); + const now = new Date(); + const diffDays = (now.getTime() - postDate.getTime()) / (1000 * 60 * 60 * 24); + return diffDays <= 30; +} + export default function Home() { const allPostsData: PostMeta[] = getSortedPostsData(); return ( -