Skip to content

Conversation

@caioteixeiraa
Copy link

Não precisa mergear ;)

leticia-chijo and others added 30 commits March 26, 2021 18:32
Inclusão de informações complementares ao readme.
Inclusão de tópicos explicativos.
Incluso link correto da Api.
Adicionado carrinho - falta funcionalidades
Copy link
Author

@caioteixeiraa caioteixeiraa left a comment

Choose a reason for hiding this comment

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

Oi grupo 6!

Muito legal o projeto de vocês, parabéns pela dedicação e evolução aqui!

O projeto possui um problema com o cálculo do preço dos produtos dentro do carrinho. Quando seleciono um produto de 300 e um de 50, o subtotal fica como "30050". Provavelmente isso se deve com o fato de estar somando strings em vez de numbers. Legal dar uma revisada nisso para projetos futuros.

Mas a estilização foi uma das melhores que vi, ficou super simples e bonita a interface. A animação do carrinho ficou bem legal e tem scroll dentro do carrinho 😲 . Parabéns demais!

Parabéns e vamos em frente! 👏 👏

Comment on lines 1 to +2
import React from 'react'
import {useState, useEffect} from 'react'
Copy link
Author

Choose a reason for hiding this comment

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

Pode importar tudo na mesma linha!

import React, { useState, useEffect } from 'react'

Comment on lines +11 to +20
const Container = style.div`
display: grid;
grid-template-columns: 1fr 3fr;
`
const Coluna1 = style.div`
margin-left: 50px;
`
const Coluna2 = style.div`
margin: 0 auto;
`
Copy link
Author

Choose a reason for hiding this comment

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

Recomendo separar os componentes styled em um arquivo separado e importá-los pra dentro do componente que for utilizar. Deixa o código bem organizadinho :)

const productList = products.map(item => {
console.log(item)
return (
<div>
Copy link
Author

Choose a reason for hiding this comment

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

Se a div servir apenas para agrupar outros elementos, recomendo trocar pelo Fragment: <> </>

Comment on lines +1 to +24
import axios from 'axios';

const baseUrl = 'https://us-central1-labenu-apis.cloudfunctions.net/fourUsedThree/products';


export const createProduct = async (body) => {
try{
return await axios.post(baseUrl,body)

} catch(er){
console.log(er)
}

}

export const getProduct = async () => {
try{
return await axios.get(baseUrl)
// console.log(res.data)
} catch(e){
console.log(e)
}
}

Copy link
Author

Choose a reason for hiding this comment

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

Muito legal!!

Na 3ª semana do mod3, vamos fazer coisas parecidas com isso! Vai ser massa.

Comment on lines +72 to +73
//console.log("Teste");
// eslint-disable-next-line no-whitespace-before-property
Copy link
Author

Choose a reason for hiding this comment

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

Cuidado com comentários deixados no código assim como console.logs da vida hehehe

Comment on lines +114 to +121
/**
//chamar a Appi
<Api />
* axios
.post( baseUrl, body, {} )
.then((resp) => {
console.log(resp.config.data);
Copy link
Author

Choose a reason for hiding this comment

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

Aqui também hehe

@@ -0,0 +1,24 @@
import React, { useState } from "react";
import * as c from "./CardCartElements";
Copy link
Author

Choose a reason for hiding this comment

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

Boa!!

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.

8 participants