-
Notifications
You must be signed in to change notification settings - Fork 1
PR de correção #10
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: correcao-projeto
Are you sure you want to change the base?
PR de correção #10
Conversation
Inclusão de informações complementares ao readme.
Inclusão de tópicos explicativos.
layout card-produto e filtro.
Feat/atualização header
Atualização layout.
Incluso link correto da Api.
Adicionado carrinho - falta funcionalidades
Marketplace6
inicio logica carrinho
renderização produtos
Projeto em andamento.
caioteixeiraa
left a comment
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.
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! 👏 👏
| import React from 'react' | ||
| import {useState, useEffect} from 'react' |
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.
Pode importar tudo na mesma linha!
import React, { useState, useEffect } from 'react'
| 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; | ||
| ` |
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.
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> |
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.
Se a div servir apenas para agrupar outros elementos, recomendo trocar pelo Fragment: <> </>
| 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) | ||
| } | ||
| } | ||
|
|
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.
Muito legal!!
Na 3ª semana do mod3, vamos fazer coisas parecidas com isso! Vai ser massa.
| //console.log("Teste"); | ||
| // eslint-disable-next-line no-whitespace-before-property |
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.
Cuidado com comentários deixados no código assim como console.logs da vida hehehe
| /** | ||
| //chamar a Appi | ||
| <Api /> | ||
| * axios | ||
| .post( baseUrl, body, {} ) | ||
| .then((resp) => { | ||
| console.log(resp.config.data); |
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.
Aqui também hehe
| @@ -0,0 +1,24 @@ | |||
| import React, { useState } from "react"; | |||
| import * as c from "./CardCartElements"; | |||
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.
Boa!!
Não precisa mergear ;)