enter code hereit not working for me how can i change this to version 9
db.collection("movies")
.doc(id)
.getDoc()
.then((doc) => {
if (doc.exists) {
setDetailData(doc.data());
} else {
console.log("no such document in firebase 🔥");
}
})
.catch((error) => {
console.log("Error getting document:", error);
});
}, [id]);