Bren y Xel PR#11
Conversation
react template
app conflict
Xel menu component
Xel - menu card
card style
complete project
Bren build folder
reloadercf
left a comment
There was a problem hiding this comment.
Bren y Xel, su proyecto esta genial y cumple con los requerimientos técnicos especificados en el readme, tengo dos recomendaciones: 1) Definir mejor el nombre asignado a los elementos (variables, clases, funciones, etc...) esto para tener una mejor claridad al momento de leer el proyecto. 2) cuidar la modularización, veo que algunos archivos superan las 100 lineas de código, esto lo pueden mejorar mudularizando sus componentes y reutilizando cuando sea necesario, lo que me agrada es que implementaron testing y usaron de manera adecuada GitHub, las invito a tener su propia versión utilizando tags.
| @@ -0,0 +1,3 @@ | |||
| node_modules/ | |||
| .vscode/ | |||
| package-lock.json | |||
There was a problem hiding this comment.
No subir la carpeta de build
| package-lock.json | |
| package-lock.json | |
| build/ |
| @@ -0,0 +1,45 @@ | |||
| { | |||
| "name": "template", | |||
There was a problem hiding this comment.
Completar la información
| "name": "template", | |
| "name": "Burguer queen", |
| <meta name="msapplication-TileImage" content="/ms-icon-144x144.png"> | ||
| <meta name="theme-color" content="#ffffff"> | ||
| <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> | ||
| <title>Burger Queen</title> |
| import React, { useState, useEffect } from 'react'; | ||
| import { BrowserRouter, Switch, Route } from 'react-router-dom'; | ||
| import Dashboard from './components/dashboard/Dashboard.jsx'; | ||
| import Orders from './components/orders/order/Orders'; | ||
| import SignIn from './components/auth/SignIn'; | ||
| import AllOrders from './components/admon/all-orders/AllOrders'; | ||
| import Admin from './components/admon/Admin'; | ||
| import BurgerQueen from './components/BQ/BurgerQueen.jsx'; | ||
| import 'materialize-css/dist/css/materialize.min.css'; | ||
| import { firebase } from './firebase/firebaseConfig'; | ||
|
|
There was a problem hiding this comment.
Primero dependencias después componentes
| import React, { useState, useEffect } from 'react'; | |
| import { BrowserRouter, Switch, Route } from 'react-router-dom'; | |
| import Dashboard from './components/dashboard/Dashboard.jsx'; | |
| import Orders from './components/orders/order/Orders'; | |
| import SignIn from './components/auth/SignIn'; | |
| import AllOrders from './components/admon/all-orders/AllOrders'; | |
| import Admin from './components/admon/Admin'; | |
| import BurgerQueen from './components/BQ/BurgerQueen.jsx'; | |
| import 'materialize-css/dist/css/materialize.min.css'; | |
| import { firebase } from './firebase/firebaseConfig'; | |
| import React, { useState, useEffect } from 'react'; | |
| import 'materialize-css/dist/css/materialize.min.css'; | |
| import { firebase } from './firebase/firebaseConfig'; | |
| import { BrowserRouter, Switch, Route } from 'react-router-dom'; | |
| import Dashboard from './components/dashboard/Dashboard.jsx'; | |
| import Orders from './components/orders/order/Orders'; | |
| import SignIn from './components/auth/SignIn'; | |
| import AllOrders from './components/admon/all-orders/AllOrders'; | |
| import Admin from './components/admon/Admin'; | |
| import BurgerQueen from './components/BQ/BurgerQueen.jsx'; | |
| return unsuscribe; | ||
| }, []); | ||
|
|
||
| const [data, setData] = useState({ |
There was a problem hiding this comment.
| const [data, setData] = useState({ | |
| let [data, setData] = useState({ |
| .then(data => { | ||
| setBreakfast(data.desayunos); | ||
| }); | ||
| }, [] |
There was a problem hiding this comment.
Precaucion con esta linea
| }, [] | |
| }, [] |
| const FoodItem = ({ item, id, price, quantity, addOrder }) => ( | ||
| <div className='col m6 space'> | ||
| <div className='card general' onClick={() => { addOrder({ item, price, id, quantity }); }}> | ||
| <div className="card-image row food-image"> | ||
| <img src={`/img/products/${id}.png`} className='col m6 img-icon item' alt='food-img' /> | ||
| </div> | ||
| <div className='card-content white-text center-align'> | ||
| <div> | ||
| <p className='info' name='item'>{item}</p> | ||
| <p className='info' name='price'>$ {price}.00 </p> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| ); |
There was a problem hiding this comment.
esto pueden modularizarlo en un componente
| padding-left: 50px !important; | ||
| } | ||
|
|
||
| .icn{ |
There was a problem hiding this comment.
definir mejor
| .icn{ | |
| .icn{ |
| </thead> | ||
| <tbody> | ||
| { | ||
| newProduct.map((item) => ( |
There was a problem hiding this comment.
Cada que haces un .map() tienes que usar key en los elementos renderizáados
| newProduct.map((item) => ( | |
| newProduct.map((item) => ( |
|
|
||
| const updateDoc = async (e) => { | ||
| e.preventDefault(); | ||
| console.log(orderSelected.id); |
There was a problem hiding this comment.
su consola debe de estar limpia
| console.log(orderSelected.id); | |
No description provided.