Advertisement
Guest User

Untitled

a guest
Apr 7th, 2020
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.   render() {
  2.     const { tripCost, options, setOrderOption, address, tripName, tripId, countryCode } = this.props;
  3.     console.log('address ', address)
  4.  
  5.     const { name, contact } = options
  6.  
  7.     const isFormValid = this.isFormValid(options)
  8.  
  9.     return (
  10.       <Grid>
  11.         <Row>
  12.           {pricing.map(option =>
  13.             <Col md={4} key={option.id}>
  14.               <OrderOption {...option} currentValue={options[option.id]} setOrderOption={setOrderOption} />
  15.             </Col>
  16.           )}
  17.           <Col xs={12}>
  18.             <OrderSummary tripCost={tripCost} options={options} />
  19.             {
  20.               isFormValid ? (
  21.                 <p>Please provide name and contact to submit order</p>
  22.               ) : (
  23.                 <Button onClick={() => sendOrder(options, tripCost, address, tripName, tripId, countryCode)}>Order now!</Button>
  24.               )
  25.             }
  26.            
  27.           </Col>
  28.         </Row>
  29.       </Grid>
  30.     );
  31.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement