component: add price in OrderSummary
This commit is contained in:
		
							parent
							
								
									77a69afbe9
								
							
						
					
					
						commit
						3ec3df773d
					
				@ -20,6 +20,7 @@ const orderSummary = (props) => {
 | 
			
		||||
            <ul>
 | 
			
		||||
                {ingredients}
 | 
			
		||||
            </ul>
 | 
			
		||||
            <p><strong>Total Price: {props.price.toFixed(2)}</strong></p>
 | 
			
		||||
            <p>Continue to Checkout?</p>
 | 
			
		||||
            <Button btnType="Danger" clicked={props.purchaseCancalled}>CANCEL</Button>
 | 
			
		||||
            <Button btnType="Success" clicked={props.purchaseContinued}>CONTINUE</Button>
 | 
			
		||||
 | 
			
		||||
@ -106,6 +106,7 @@ class BurgerBuilder extends Component {
 | 
			
		||||
                    modalClosed={this.purchaseCancelHandler}>
 | 
			
		||||
                    <OrderSummary
 | 
			
		||||
                        ingredients={this.state.ingredients}
 | 
			
		||||
                        price={this.state.totalPrice}
 | 
			
		||||
                        purchaseCancalled={this.purchaseCancelHandler}
 | 
			
		||||
                        purchaseContinued={this.purchaseContinueHandler}></OrderSummary>
 | 
			
		||||
                </Modal>
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user