import { Markdown } from "@urbit/foundation-design-system"; import EcosystemBadge from "./Badge"; 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?.type === "Group") ? `${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]?.matchedPost?.tile) && ( )}

{post?.[feat].title}

{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 === "Community" && ( More about {post[feat].title} )} {post[feat].type === "Marketplace" && ( More about {post[feat].title} )} {post[feat].type === "Group" && ( More about {post[feat].title} )}
) : null; }); }