import Link from "next/link"; import BackgroundImage from "./BackgroundImage"; import { formatDate, generateDisplayDate } from "../lib/lib"; export default function PostPreview(props) { const section = props?.section ? props.section : "blog"; const date = generateDisplayDate(props.post.date); return (
{props.title ?

{props.title}

: null}

{props.post.title}

{props.post.extra.author ? (
{props.post.extra.author}
) : null} {props.post.extra.ship ? (
{props.post.extra.ship}
) : null}
{formatDate(date)}
); } PostPreview.defaultProps = { className: "", };