This my code which is showing error I am trying to add collection to my posts documents with a name of “comments”
await addDoc(collection(db, ‘posts’, id, ‘comments’), {
comment: commentToSend,
username: session.user.username,
userImage: session.user.image,
timestamp: serverTimestamp(),
});enter image description here