-
Notifications
You must be signed in to change notification settings - Fork 46
Solution: Jon Garcia y Sebastian Burpbacher #14
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
base: main
Are you sure you want to change the base?
Conversation
preparing routes
This reverts commit c3a35e4.
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.
Muy buen proyecto! 👏🏻👏🏻👏🏻 Habéis implementado muy bien muchas funcionalidades con React. A por el siguiente!
import Home from "./components/pages/Home"; | ||
import Active from "./components/pages/Active"; | ||
import Completed from "./components/pages/Complete"; | ||
// import Todo from "./components/Todo"; |
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.
es recomendable eliminar todo el código comentado que no se utiliza
|
||
handleDelete(itemId) { | ||
const { todos } = this.state; | ||
const notDelete = todos.filter((el) => el.id !== itemId); |
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.
Muy bien implementado!
Es recomendable nombrar las variables con un nombre descriptivo para que se entienda exactamente qué es la variable. En este caso como mejora se podría llamar el argument el
como todo
import React from "react"; | ||
import "./_Button.scss"; | ||
// import { Link } from "react-router-dom"; | ||
|
||
const Checkbox = ({ ...newers }) => { | ||
return <input className="check" type="checkbox" {...newers} />; | ||
}; | ||
|
||
function Button({ ...newers }) { | ||
return <input className="but" type="button" {...newers} />; | ||
} | ||
function ClearBut({ ...newers }) { | ||
return <input className="butClear" type="button" {...newers} />; | ||
} | ||
export { Button, Checkbox, ClearBut }; |
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.
Este fichero se debería extraer a varios componentes ya que el fichero se llama Button
pero incluye componentes que no son botón como el checkbox.
@@ -0,0 +1,24 @@ | |||
import React from "react"; | |||
import "./footer.scss"; |
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.
Es recomendable ordenar los imports para tener los imports de librerías primero y luego los imports de dependencias propias.
En este caso sería:
import React from "react";
import { Link } from "react-router-dom";
import "./footer.scss";
import { ClearBut } from "../Button/Button";
<Link to="/completed" className="nav_links"> | ||
<h6>Completed</h6> | ||
</Link> | ||
<ClearBut onClick={clear} /> |
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.
Sería recomendable renombrar este componente a <ClearButton />
en vez de <ClearBut />
para ser más descriptivo.
console.log(this.state); | ||
} | ||
|
||
handleEditing = (event) => { |
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.
Es recomendable definir las funciones de forma más consistente, o todas como arrow function o todas como método de la clase aunque funcione bien.
@mixin grid3($cell1,$cell2,$cell3,$gap) { | ||
display: grid; | ||
grid-template-columns: $cell1 $cell2 $cell3; | ||
column-gap: $gap; | ||
justify-content: left; | ||
align-content: flex-start; | ||
} | ||
@mixin resetMarginPadding { | ||
margin: 0; | ||
padding: 0; | ||
} | ||
@mixin inputs($color,$top,$bot){ | ||
border-radius: 3px; | ||
border: $borderColor; | ||
height: 40px; | ||
width: 80%; | ||
justify-content: center; |
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.
Es recomendable dejar Prettier con la configuración de format on save de vscode para que el código esté siempre formateado y lo más legible posible.
color: $color; | ||
font-family: $fonts; | ||
margin-bottom: $dist; | ||
} |
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.
Como recomendación, siempre se debe dejar un salto de linea en los ficheros. Si usamos una herramienta como Prettier esto se hará de forma automática siempre.
newTodo, | ||
}) { | ||
return ( | ||
<> |
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.
Como main ya es un contenedor es mejor quitar el fragment ya que no hace falta.
margin-right: 20px; | ||
} | ||
|
||
.but { |
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.
Los nombres de clases deberían ser más descriptivos para evitar palabras que puedan significar otra cosas en inglés como but
. Un nombre más adecuado podría ser directamente .button
Os recomiendo repasar esta guia de cómo escribir buenos mensajes de commit ya que algunos del Pull Request no son muy óptimos o descriptivos. |
No description provided.