Class: DrinkDetails

frontend~DrinkDetails(props)

A detailed view pannel for a drink recipe. Future versions should instead extend a shared detailed component

Constructor

new DrinkDetails(props)

Initializes state and binds methods
Parameters:
Name Type Description
props Array.<any> Should contain an drinkId, an order drink callback method, a delete callback method, and parental update and change methods.
Source:

Extends

  • React.Component

Methods

componentDidUpdate(prevProps)

Component update callback. Checks for drink ID changes and refreshes the drink details
Parameters:
Name Type Description
prevProps Array.<any>
Source:

deleteDrink()

Button click callback for deletion. Updates self and parent.
Source:

render()

Renders out a fullscreen pannel with all the drink details. Contains functionality to delete and order
Source: