-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Need to write readme .... #16
base: master
Are you sure you want to change the base?
Conversation
server.js
Outdated
} else { | ||
orderId = Math.max(...Object.keys(orders)) + 1 | ||
} | ||
orders[parseInt(orderId)] = { |
There was a problem hiding this comment.
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
src/components/App.js
Outdated
} | ||
console.log(orderObject) | ||
|
||
fetch('http://localhost:8080/api/order', { |
There was a problem hiding this comment.
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
src/components/OrderItem.js
Outdated
|
||
import "../styles/App.scss"; | ||
|
||
class OrderItem extends React.Component { |
There was a problem hiding this comment.
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
src/components/Order.js
Outdated
|
||
import "../styles/Orders.scss"; | ||
|
||
class Order extends React.Component { |
There was a problem hiding this comment.
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
src/components/Menu.js
Outdated
|
||
import "../styles/Menu.scss"; | ||
|
||
class Menu extends React.Component { |
There was a problem hiding this comment.
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
Great work |
… screen in browser
… screen in browser
No description provided.