I'm currently working on accessing information from a blog using Typescript. I'm having trouble figuring out how to access the title item since it is within an array.
export default function Post({list}: Props) {
console.log("🚀 ~ file: post.tsx ~ line 13 ~ Post ~ getBlog", list)
return (
<div>
<h1>{list?.listBlogs?.items?.title}</h1>
<img src={list?.getBlog?.coverImage}></img>
<p>{list?.getBlog?.content}</p>
<p>A whole paragraph</p>
</div>
)
}
Here's the snippet highlighting the issue I'm encountering with the title. https://i.sstatic.net/WXSXz.png