import Image from "next/image"; import Link from "next/link"; import { cx } from "@utils/all"; import GetImage from "@utils/getImage"; import { parseISO, format } from "date-fns"; import { PhotographIcon } from "@heroicons/react/outline"; import CategoryLabel from "@components/blog/category"; export default function PostList({ post, aspect, preloadImage }) { const imageProps = post?.mainImage ? GetImage(post.mainImage) : null; const AuthorimageProps = post?.author?.image ? GetImage(post.author.image) : null; return ( <>
{imageProps ? ( {post.mainImage.alt ) : ( )}

{post.title}

{post.excerpt && (

{post.excerpt}

)}
{post.author.image && ( {post?.author?.name} )}
{post.author.name}
•
); }