You need to use conditional (ternary) operators to render it properly
{
peoplePosts.map((post) => (
<div key={post.id}>
<h2>{post.title}</h2>
<p>{post.content}</p>
{post.featuredImage ? (
<p>Yay</p>
) : (
<p>Ouch</p>
)}
</div>
))
}