import { IconArrowLeft as ArrowLeft, IconCalendar as Calendar, IconUser as User, } from '@tabler/icons-react'; import { Link, useParams } from 'react-router'; import { PROJECT_DISPLAY_NAME } from '@/components/Logo'; import { Nav } from '@/components/Nav'; import { SEO } from '@/components/SEO'; import FooterSection from '@/components/sections/footer'; import { Button } from '@/components/ui/button'; import { getPost, posts } from '@/lib/blog'; export function BlogIndex() { return (
); } export function BlogPost() { const { slug } = useParams<{ slug: string }>(); const post = slug ? getPost(slug) : undefined; if (!post) { return (
); } return (
); } function formatDate(dateStr: string): string { // Frontmatter dates are calendar dates; a bare YYYY-MM-DD parses as UTC // midnight, so render in UTC or every viewer west of UTC sees the prior day. return new Date(dateStr).toLocaleDateString('en-US', { year: 'numeric', month: 'long', day: 'numeric', timeZone: 'UTC', }); } /** Default export for React.lazy() route-level code splitting */ export default function BlogRoute() { const { slug } = useParams<{ slug: string }>(); return slug ? : ; }