Open
Conversation
| this.setState({currentOrder: updatedOrder}) | ||
| } | ||
| removeItemOrder(id) { | ||
| const array = [...this.state.currentOrder]; |
Contributor
There was a problem hiding this comment.
It might be easier to store orders in an object that uses ids as keys as it would make look ups much simpler
| // values = Object.values(this.props.menu); | ||
| // values.map(); | ||
| return this.props.menu.filter(menuitem => menuitem.category === course) | ||
| .map(menuitem => { |
Contributor
There was a problem hiding this comment.
Indentation here would make code easier to read
|
|
||
| const buttonclasses = cx('menuitem__submit', { | ||
| 'added': this.state.added, | ||
| '': !this.state.added |
Contributor
There was a problem hiding this comment.
think this can be removed as it does not add any classes
| <ul className="menu--settings"> | ||
| {Object.keys(this.props.orders).map(order => { | ||
| console.log({order}) | ||
| return <OrderAdminItem |
Contributor
There was a problem hiding this comment.
OrderAdminItem will need a key
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tweaks made to ensure still working as intended for now.
Functionality - error handling for addition of products.
Needs work on shopping basket and control of component appearance
Also on design - but this at mobile MVP as part of current development