PR de correção! Não precisa mergeear! #18
PR de correção! Não precisa mergeear! #18pedro-severo wants to merge 44 commits intocorrecao-projetofrom
Conversation
Componentização
Layout básico
Adicionamos a requisição de serviços cadastrados
Nova Componentização
Feita a parte de todas as ordenações
Estilização inicial CardServicos e inicio funcionalidade da criação de Serviços
Filtros inseridos
Resolvendo Conflitos
Parte de cadastrar serviços concluído
Estilização Header e footer, inserção de botoes do header
Funcionalidade botão candidatar-me
estilização card de criação de serviços
Feita estilização da home
Feito layout da pagina de serviços
estilizacao home, grid e botoes
…string para comparar, então coloquei a função Number
Resolvido problema do filtro, o problema era que estavamos recebendo …
Future Ninjas
| <Header | ||
| onClickCriarServico={this.onClickCriarServico} | ||
| onClickServicos={this.onClickServicos} | ||
| onClickHome={this.onClickVoltar}/> |
There was a problem hiding this comment.
Atenção pra identação. Coloquem margem nas props e quebrem linha para fechar a tag:
<Header
onClickCriarServico={this.onClickCriarServico}
onClickServicos={this.onClickServicos}
onClickHome={this.onClickVoltar}
/>
| const renderizaNaTela = () => { | ||
|
|
||
| switch (this.state.paginaSelecionada) { | ||
| case "home": | ||
| return <Home | ||
| abrirServico={this.onClickServicos} | ||
| abrirCriacaoDeServicos={this.onClickCriarServico} | ||
| /> | ||
| case "servicos": | ||
| return <Servicos | ||
| voltar={this.onClickVoltar} | ||
| /> | ||
| case "criacaodeservicos": | ||
| return <CriacaoDeServicos | ||
| voltar={this.onClickVoltar} | ||
| /> | ||
| } | ||
| } |
There was a problem hiding this comment.
Bom uso da renderização condicional! 👏👏
| const ContainerInputs = styled.div` | ||
| display: flex; | ||
| justify-content: center; | ||
| width: 50vw; | ||
| margin: 8px auto; | ||
| ` | ||
| const ContainerButtons = styled.div` | ||
| width: 10vw; | ||
| display: flex; | ||
| justify-content:space-between; | ||
| margin: 0 auto; | ||
| ` | ||
| const StyledTextField = styled(TextField)` | ||
| width: 30vw; | ||
| ` | ||
| const ContainerServicos = styled.div` | ||
| border: 1px solid black; | ||
| width: 50vw; | ||
| padding: 16px; | ||
| margin: 16px auto; | ||
| border-radius: 20px; |
There was a problem hiding this comment.
Na próxima, tentem isolar as constantes do styled-components em um arquivo separado e apenas as importem no componente. Isso deixa o código bem mais limpo. Se vcs tiverem dúvida sobre isso, mandem lá no canal de dúvidas que podemos ajudar vcs...
| <FormGroup> | ||
| <FormControlLabel | ||
| control={ | ||
| <CheckBox color="primary" type="checkbox" id="Transferência Bancária" value="Transferência Bancária" onChange={this.onChangeChecked}/> |
There was a problem hiding this comment.
Atenção com a identação. Muitas props pedem quebra de linhas...
| } | ||
| } | ||
|
|
||
| export default CriacaoDeServicos No newline at end of file |
There was a problem hiding this comment.
Apesar dos meus comentários sobre identação, o código está muito bem escrito e identado! Parabéns!
| const H1Header = styled.h1` | ||
| margin: 0; | ||
| padding: 0; | ||
| font-family: Andale Mono, monospace; | ||
| cursor: pointer; | ||
| ` |
There was a problem hiding this comment.
Atenção para nomeação das constantes do styled-components. H1 não é um bom nome.
| state = { | ||
|
|
||
| } |
There was a problem hiding this comment.
Se vcs não usaram o estado nesse componente, não precisam chamá-lo.
| const H2 = styled.h2` | ||
| font-size: 40px; | ||
| font-family: helvetica''; | ||
| /* margin: 45px 0 0 25px;*/ | ||
| display: grid; | ||
| grid-column: 2/3; | ||
| font-weight: lighter; | ||
| align-items: center; | ||
| ` | ||
|
|
||
| const H4 = styled.h4` | ||
| font-weight: lighter; | ||
| font-size: 16px; | ||
| font-family: 'helvetica'; | ||
| display: grid; | ||
| grid-column: 2/4; | ||
| grid-row: 2/4; | ||
|
|
||
| ` |
There was a problem hiding this comment.
Atenção para nomeação de títulos...
| const ContainerCard = styled.div` | ||
| border: 1px solid #b2aeae; | ||
| padding: 16px; | ||
| width: 90%; | ||
| height: 100%; | ||
| margin: 0 auto; | ||
| display: grid; | ||
| grid-row: repeat(7, 1fr); | ||
| ` |
There was a problem hiding this comment.
Atenção para identação. De margens nas configs do CSS
| import React from 'react' | ||
| import styled from 'styled-components' | ||
| import axios from 'axios' | ||
| //import {ButtonCriacao} from '../CriacaoDeServicos' |
There was a problem hiding this comment.
Não deixem códigos comentados!
| axios.get('https://us-central1-labenu-apis.cloudfunctions.net/futureNinjasOne/jobs',) | ||
| .then((response) => { | ||
| this.setState({listaDeServicos: response.data.jobs, listaFiltrada: response.data.jobs} ) | ||
| }).catch((error) => { | ||
| console.log(error.message) | ||
| }) |
There was a problem hiding this comment.
Atenção para identação. Deem margem nas funções!
| function ordenaTituloAZ(a,b){ | ||
| return (a.title > b.title) ? 1 : ((b.title > a.title) ? -1 : 0); | ||
| } | ||
| function ordenaTituloZA(a,b){ | ||
| return (b.title > a.title) ? 1 : ((a.title > b.title) ? -1 : 0); | ||
| } | ||
|
|
||
| function ordenaPrecoMenor (a,b){ | ||
| return a.value - b.value | ||
| } | ||
| function ordenaPrecoMaior (a,b){ | ||
| return b.value - a.value | ||
| } | ||
|
|
||
| function ordenaPrazoMenor (a,b){ | ||
| return (a.dueDate > b.dueDate) ? 1 : ((b.dueDate > a.dueDate) ? -1 : 0); | ||
| } | ||
| function ordenaPrazoMaior (a,b){ | ||
| return (b.dueDate > a.dueDate) ? 1 : ((a.dueDate > b.dueDate) ? -1 : 0); | ||
| } |
There was a problem hiding this comment.
Atenção para nomeação de variáveis! Parâmetros a e b não querem dizer nada para quem lê o código
|
Oi, querida(o)s! Fiz alguns comentários pelo código, deem uma olhada, por favor! Mas no geral, a entrega de vocês está excelente!! Parabéns pelo trabalho e esforço! Vcs conseguiram aplicar tudo o que aprenderam no módulo 2 e fecharam o módulo com chave de ouro! Além disso, apesar de alguns pontos de melhoria que levantei ao longo do código, a identação de vocês está muito boa, parabéns! Continuem assim! |
PR de correção! Não precisa mergeear!
enthusiastic-beetle.surge.sh