adding more loops for the admin page

This commit is contained in:
Arjun Patel
2022-01-14 20:22:22 -08:00
parent d2018bb71a
commit 72faf33dd6
6 changed files with 341 additions and 110 deletions
+4 -5
View File
@@ -38,13 +38,12 @@ export default class UserService {
}
}
async getUserRealtime(
userId: string,
handleDataFetch: (doc: DocumentSnapshot) => void
): Promise<Unsubscribe> {
async getUserRealtime(userId: string): Promise<Unsubscribe> {
const docRef = doc(this.db, Collections.users, userId);
const unsub = onSnapshot(docRef, handleDataFetch);
const unsub = onSnapshot(docRef, (doc) => {
console.log(doc.data());
});
return unsub;
}