function RightFeed() {
const [posts, setPosts] = useState();
const { createdAt, updatedAt, read, sentImages, username } = useMoralisSubscription(
“Posts”,
(query) =>
query
.descending(“updatedAt”),
[],
{
live: true,
onUpdate: (data) => setPosts(data.map((data) => ({
id: data.objectId,
data: data.data,
})))
}
);
return (
<>
Chat
<div className={style.chats}>
{posts.map(({id, data: {createdAt, updatedAt, read, sentImages, username}}) =>
<Chat
key={id}
id={id}
createdAt={createdAt}
updatedAt={updatedAt}
read={read}
sentImages={sentImages}
username={username}
/>
)}
can anybody recognize what is wrong with my project code I would much like to move further along my project to a different error that puts me on the verge of tears