async function getUserByEmail(email: string) {
const docRef = doc(db, "users", email);
const docSnap = await getDoc(docRef);
if (docSnap.exists()) {
console.log("Document data:", docSnap.data());
} else {
// doc.data() will be undefined in this case
console.log("No such document!");
}
}
What i'm doing wrong? i think i'm using the wrong method...
I've tried to learn the documentation but i thought confuse
Please i ask for your help!