on master help sign in
post: fix the *other* usage of matchedpost image
fded247Matilde Park
components/ecosystem/Post.js+2−1
@@ -3,6 +3,7 @@ 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) => {
6+ console.log(post[feat]?.matchedPost);
6 const childPath =
7 const childPath =
7 post[feat] && post[feat]?.matchedPost?.type === "Application"
8 post[feat] && post[feat]?.matchedPost?.type === "Application"
8 ? `${post[feat]?.matchedPost.ship}/${post[feat].matchedPost.slug}`
9 ? `${post[feat]?.matchedPost.ship}/${post[feat].matchedPost.slug}`
@@ -26,7 +27,7 @@ export default function Post({ post }) {
26 {post[feat]?.matchedPost?.image && (
27 {post[feat]?.matchedPost?.image && (
27 <img
28 <img
28 className="rounded-xl w-24 object-cover"
29 className="rounded-xl w-24 object-cover"
29− src={post[feat].image}
30+ src={post[feat]?.matchedPost?.image}
30 />
31 />
31 )}
32 )}
32 </div>
33 </div>