Skip to content
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

HL - DeliverEAT App #7

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open

HL - DeliverEAT App #7

wants to merge 13 commits into from

Conversation

HTLuff
Copy link

@HTLuff HTLuff commented Jul 5, 2018

No description provided.

if (specificOrder) {
res.json(specificOrder);
} else {
res.status(404).json({ error: "Order not found" });
Copy link
Contributor

Choose a reason for hiding this comment

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

nice

}

getBasket(total) {
const deliveryCharge = total * 0.1;
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be slightly cleaner to implement this function as a separate child component and make this component simpler. Also, personal opinion` an if/else would be easier to read than multiline ternary

@@ -0,0 +1,14 @@
import React from "react";

class Footer 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

@@ -0,0 +1,14 @@
import React from "react";

class Header 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

@@ -0,0 +1,44 @@
import React from "react";

class Item 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

import Item from "./Item";
import Basket from "./Basket";

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

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.

3 participants