@@ -3,25 +3,34 @@ import classnames from "classnames";
3import Link from "next/link";
3import Link from "next/link";
4export default function Post({ post }) {
4export default function Post({ post }) {
5 return ["featured-1", "featured-2", "featured-3"].map((feat) => {
5 return ["featured-1", "featured-2", "featured-3"].map((feat) => {
7+ post[feat] && post[feat]?.matchedPost?.type === "Application"
8+ ? `${post[feat]?.matchedPost.ship}/${post[feat].matchedPost.slug}`
9+ : `${post[feat].matchedPost?.slug}`;
10+ const href = post[feat]?.matchedPost
11+ ? `/${post[feat].matchedPost.type.toLowerCase()}s/${childPath}`
6 return post?.[feat] ? (
13 return post?.[feat] ? (
7− <div
14+ <Link href={href || "#"}>
8− className="mt-8 mb-24"
16+ className="mt-8 mb-24 cursor-pointer"
9− id={post?.[feat].title.toLowerCase().replace(/ /, "-")}
17+ id={post?.[feat].title.toLowerCase().replace(/ /, "-")}
11− <div className="flex space-x-4 items-center">
19+ <div className="flex space-x-4 items-center">
13− className="rounded-xl w-24 object-cover"
21+ className="rounded-xl w-24 object-cover"
14− src={post[feat].image}
22+ src={post[feat].image}
16− <div className="flex flex-col">
24+ <div className="flex flex-col">
17− <h4 className="text-xl pb-1 font-bold">{post?.[feat].title}</h4>
25+ <h4 className="text-xl pb-1 font-bold">{post?.[feat].title}</h4>
18− {badge(post[feat].type)}
26+ {badge(post[feat].type)}
29+ <div className="markdown mt-8">
30+ <Markdown.render content={JSON.parse(post[feat].content)} />
21− <div className="markdown mt-8">
33+ </Link>
22− <Markdown.render content={JSON.parse(post[feat].content)} />