import { normalizeDate } from "@/lib/date"; import { fontSypxzs } from "@/styles/font"; import { TPostListItem } from "@/types/post-list"; import { nanoid } from "nanoid"; import Link from "next/link"; export const PostList = (props: { data: TPostListItem[] }) => { return (
{props.data.map((postListItem, index) => (

{postListItem.frontMatter.title}

{postListItem.frontMatter.subtitle && (
{postListItem.frontMatter.subtitle}
)}
{normalizeDate(postListItem.frontMatter.time)}
{postListItem.frontMatter.summary && (

{postListItem.frontMatter.summary}

)} {postListItem.frontMatter.tags && (
{postListItem.frontMatter.tags.map((tagName) => ( {tagName} ))}
)}
))}
); };