Skip to content

Deliver Eat Lemony#23

Open
LemonyDesign wants to merge 6 commits into
constructorlabs:masterfrom
LemonyDesign:master
Open

Deliver Eat Lemony#23
LemonyDesign wants to merge 6 commits into
constructorlabs:masterfrom
LemonyDesign:master

Conversation

@LemonyDesign

Copy link
Copy Markdown

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

Comment thread src/components/App.js
this.setState({currentOrder: updatedOrder})
}
removeItemOrder(id) {
const array = [...this.state.currentOrder];

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be easier to store orders in an object that uses ids as keys as it would make look ups much simpler

Comment thread src/components/Menu.js
// values = Object.values(this.props.menu);
// values.map();
return this.props.menu.filter(menuitem => menuitem.category === course)
.map(menuitem => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation here would make code easier to read


const buttonclasses = cx('menuitem__submit', {
'added': this.state.added,
'': !this.state.added

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OrderAdminItem will need a key

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants