Constructor
new Menu(props)
Initializes state, binds methods, and queries database for initial data.
Parameters:
Name | Type | Description |
---|---|---|
props |
Array.<any> | Should contain a username |
- Source:
Extends
- {@link
Methods
advancedSearchToggle()
Callback to be run on component mount and advanced search toggle.
Updates the page's top margin to accurately reflect the change in
fixed navigation size
- Source:
advSearch(query)
Advanced search callback
Parameters:
Name | Type | Description |
---|---|---|
query |
object | Contains all the data from AdvancedSearch to send to the database |
- Source:
componentDidMount()
Updates the main application background image to ensure it's set correctly
- Source:
orderDrink(id)
Callback for drink ordering events.
Updates state, runs queries and updates ORDER button
Parameters:
Name | Type | Description |
---|---|---|
id |
number | ID of drink to order |
- Source:
render()
Renders out the menu
Renders a navigation bar, rows of 6 drink icons, and hidden drink and
ingredient detailed view components.
- Source:
search(name)
Basic search callback
Parameters:
Name | Type | Description |
---|---|---|
name |
string | Name of drink to search for |
- Source: