Guest User

Untitled

a guest
Jan 16th, 2019
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. class HandleMyNotes extends Component {
  2. componentDidMount() {
  3. const db = firebase.firestore();
  4.  
  5. db.collection("posts")
  6. .where("author.email", "==", this.props.authorEmail)
  7. .get()
  8. .then(querySnapshot => {
  9. querySnapshot.map(doc => {
  10. return <MyNotes data={doc.data()} key={doc.id} />;
  11. });
  12. })
  13. .catch(() => {
  14. alert("An error was happend");
  15. });
  16. }
  17.  
  18. render() {
  19. return <MyNotes />;
  20. }
  21. }
Add Comment
Please, Sign In to add comment