Skip to content

Conversation

@philberryman
Copy link

No description provided.

server.js Outdated
} else {
orderId = Math.max(...Object.keys(orders)) + 1
}
orders[parseInt(orderId)] = {
Copy link
Contributor

Choose a reason for hiding this comment

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

you don't need to parse the id as it will be converted to string anyway by JS

}
console.log(orderObject)

fetch('http://localhost:8080/api/order', {
Copy link
Contributor

Choose a reason for hiding this comment

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

use relative url /api/order that will allow your app to run on any server


import "../styles/App.scss";

class OrderItem extends React.Component {
Copy link
Contributor

Choose a reason for hiding this comment

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

This could be a functional component as it does not contain state


import "../styles/Orders.scss";

class Order extends React.Component {
Copy link
Contributor

Choose a reason for hiding this comment

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

Could be a functional component as it does not contain state


import "../styles/Menu.scss";

class Menu extends React.Component {
Copy link
Contributor

Choose a reason for hiding this comment

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

This could be a functional component

@dmitrigrabov
Copy link
Contributor

Great work

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