Advertisement
Guest User

Untitled

a guest
Aug 18th, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. handleSubmit(){
  2. fb.firestore().collection("businessDetails").add({
  3. category: this.state.bCategory,
  4. description: this.state.bDescription,
  5. name: this.state.bName,
  6. since: this.state.bEstablished,
  7. phone: this.state.bPhone,
  8. uid: this.state.uid
  9. })
  10. .then(()=>{
  11. console.log("User succesfully submitted, data recorded");
  12. })
  13. .catch((error)=>{
  14. console.log(error);
  15. })
  16. }
  17.  
  18.  
  19. <Footer>
  20. <FooterTab>
  21. <Button onPress={()=>this.handleSubmit()}
  22. disabled={!this.state.flag} full
  23. style={(this.state.flag)?styles.submitButton:[]}
  24. >
  25. <Text style={styles.buttonText}>Submit and Signup</Text>
  26. </Button>
  27. </FooterTab>
  28. </Footer>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement