This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | ... | |
| class ModalContent extends Component { | |
| ... | |
| handleSubmit() { | |
| /*alert(this.props.dishId + ':' + this.state.rating + ':' + this.state.author + ':' + this.state.comment);*/ | |
| this.props.postComment(this.props.dishId, this.state.rating, this.state.author, this.state.comment); | |
| this.props.onPressCancel(); | |
| } | |
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | ... | |
| export const comments = (state = { errMess: null, comments: [] }, action) => { | |
| switch (action.type) { | |
| ... | |
| case ActionTypes.ADD_COMMENT: | |
| var newcmt = action.payload; | |
| newcmt.id = state.comments.length; | |
| return { ...state, comments: state.comments.concat(newcmt) }; | |
| ... | |
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | // comments | |
| export const postComment = (dishId, rating, author, comment) => (dispatch) => { | |
| var newcmt = { dishId: dishId, rating: rating, author: author, comment: comment, date: new Date().toISOString() }; | |
| setTimeout(() => { | |
| dispatch(addComment(newcmt)); | |
| }, 1000); | |
| }; | |
| const addComment = (newcmt) => ({ | |
| type: ActionTypes.ADD_COMMENT, | |
| payload: newcmt | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | ... | |
| // comments | |
| export const ADD_COMMENT = 'ADD_COMMENT'; | |
| ... | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | //$ expo install expo-calendar | |
| ... | |
| import * as Calendar from 'expo-calendar'; | |
| class Reservation extends Component { | |
| ... | |
| handleReservation() { | |
| Alert.alert( | |
| ... | |
| { text: 'Cancel', onPress: () => this.resetForm() }, | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | ... | |
| class Register extends Component { | |
| ... | |
| render() { | |
| return ( | |
| <ScrollView> | |
| <View style={{ justifyContent: 'center', margin: 20 }}> | |
| <View style={{ flex: 1, flexDirection: 'row', margin: 20 }}> | |
| ... | |
| <View style={{ justifyContent: 'center' }}> | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | ... | |
| import { ..., Rating } from 'react-native-elements'; | |
| ... | |
| class RenderDish extends Component { | |
| render() { | |
| ... | |
| return ( | |
| <Card> | |
| ... | |
| <View style={{ flexDirection: 'row', justifyContent: 'center' }}> | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | ... | |
| import { ..., Modal, Button } from 'react-native'; | |
| import { ..., Input } from 'react-native-elements'; | |
| ... | |
| class ModalContent extends Component { | |
| constructor(props) { | |
| super(props); | |
| this.state = { | |
| rating: 3, | |
| author: '', | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | ... | |
| class RenderDish extends Component { | |
| render() { | |
| // gesture | |
| const recognizeDrag = ({ moveX, moveY, dx, dy }) => { | |
| if (dx < -200) return 1; // right to left | |
| else if (dx > 200) return 2; // left to right | |
| return 0; | |
| }; | |
| const panResponder = PanResponder.create({ | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | ... | |
| import { ..., Alert } from 'react-native'; | |
| // class ModalContent extends Component { | |
| // ... | |
| // } | |
| class Reservation extends Component { | |
| constructor(props) { | |
| super(props); | 
NewerOlder