Skip to content

PR de correção. Não precisa mergear#8

Open
pedro-severo wants to merge 24 commits intocorrecao-projetofrom
master
Open

PR de correção. Não precisa mergear#8
pedro-severo wants to merge 24 commits intocorrecao-projetofrom
master

Conversation

@pedro-severo
Copy link

No description provided.

Comment on lines +15 to +22
/* useEffect(() => {
const data = items.map((product) => ({
...product,
priceFormatted: formatPrice(product.price),
}));
setItems(data);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []); */
Copy link
Author

Choose a reason for hiding this comment

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

Lembrem de tirar os comentários de códigos não usados.


import { formatPrice } from "../../util/format";

import { Container, ProductTable, Total } from "./styles";
Copy link
Author

Choose a reason for hiding this comment

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

Perfeito. Esse isolamento de constantes do styled é uma excelente prática.

console.log(props.valor);
};
const comparaProduto = (event) => {
console.log(event.target.value);
Copy link
Author

Choose a reason for hiding this comment

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

Lembrem de tirar os console.logs usados.

const productIndex = item.findIndex((p) => p.id === id);
if (productIndex !== -1) {
item.splice(productIndex, 1);
toast.error("Item removido do carrinho 😢 ");
Copy link
Author

Choose a reason for hiding this comment

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

Hahahaha ótimo emoji para descrever alguém tirando um produto do seu carrinho

})}
</ProductList>
</>
);
Copy link
Author

Choose a reason for hiding this comment

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

216 linha de componente. Outros componentes também ficaram grandes. Semprem tirem um tempo para componentizar o projeto.

@pedro-severo
Copy link
Author

pedro-severo commented Jun 3, 2020

Querida(o)s, fiz alguns comentários ao longo do código... deem uma olhada.

Além disso, o Darvas disponibilizou ontem (02 de junho) o gabarito do exercício em vídeo (thinking in react). Deem uma olhada lá também.

Parabéns pela entrega!

Na próxima, não se esqueçam do link do surge.

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