Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class HandleMyNotes extends Component {
- componentDidMount() {
- const db = firebase.firestore();
- db.collection("posts")
- .where("author.email", "==", this.props.authorEmail)
- .get()
- .then(querySnapshot => {
- querySnapshot.map(doc => {
- return <MyNotes data={doc.data()} key={doc.id} />;
- });
- })
- .catch(() => {
- alert("An error was happend");
- });
- }
- render() {
- return <MyNotes />;
- }
- }
Add Comment
Please, Sign In to add comment