import { Markdown } from "@urbit/foundation-design-system"; import classnames from "classnames"; import Link from "next/link"; export default function Post({ post }) { return ["featured-1", "featured-2", "featured-3"].map((feat) => { const childPath = post[feat] && post[feat]?.matchedPost?.type === "Application" ? `${post[feat]?.matchedPost.ship}/${post[feat].matchedPost.slug}` : `${post[feat].matchedPost?.slug}`; const href = post[feat]?.matchedPost ? `/${post[feat].matchedPost.type.toLowerCase()}s/${childPath}` : null; return post?.[feat] ? (
{post[feat]?.matchedPost?.image && ( )}

{post?.[feat].title}

{badge(post[feat].type)}
{post[feat].type === "Podcast" && ( Listen to {post[feat].type} )} {post[feat].type === "Article" && ( Read {post[feat].type} )} {post[feat].type === "Application" && ( View {post[feat].type} )} {post[feat].type === "Organization" && ( More about {post[feat].title} )} {post[feat].type === "Marketplace" && ( More about {post[feat].title} )}
) : null; }); } const badge = (type) => { return (
{type}
); };