useEffect(() => {
db.collection("movies")
.doc(id)
.get()
.then((doc) => {
if (doc.exists) {
setDetailData(doc.data());
} else {
console.log("no such ");
}
})
.catch((error) => {
console.log("Error getting document:", error);
});
}, [id]);
Can anyone convert this firestore code from v8 to v9?