Skip to content

HL - DeliverEAT App#7

Open
HTLuff wants to merge 13 commits into
constructorlabs:masterfrom
HTLuff:master
Open

HL - DeliverEAT App#7
HTLuff wants to merge 13 commits into
constructorlabs:masterfrom
HTLuff:master

Conversation

@HTLuff

@HTLuff HTLuff commented Jul 5, 2018

Copy link
Copy Markdown

No description provided.

Comment thread index.js
if (specificOrder) {
res.json(specificOrder);
} else {
res.status(404).json({ error: "Order not found" });

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.

nice

Comment thread src/components/Basket.js
}

getBasket(total) {
const deliveryCharge = total * 0.1;

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

Comment thread src/components/Footer.js
@@ -0,0 +1,14 @@
import React from "react";

class Footer extends React.Component {

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.

This could be a functional component

Comment thread src/components/Header.js
@@ -0,0 +1,14 @@
import React from "react";

class Header extends React.Component {

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.

This could be a functional component

Comment thread src/components/Item.js
@@ -0,0 +1,44 @@
import React from "react";

class Item extends React.Component {

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.

This could be a functional component

Comment thread src/components/Menu.js
import Item from "./Item";
import Basket from "./Basket";

class Menu extends React.Component {

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.

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.

2 participants