-
Notifications
You must be signed in to change notification settings - Fork 0
Preparando revisão do código da Lau #1
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
|
Someone is attempting to deploy a commit to a Personal Account owned by @issitarual on Vercel. @issitarual first needs to authorize it. |
gugabs
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.
Oie, Lau! Tá bem? Aqui é o Guga :)
Parabéns por mais uma entrega! Mandou bem demais na implementação de praticamente todas as features.
Eu deixei nesse Pull Request alguns comentários que podem te ajudar daqui para frente.
| </Checkmark> | ||
| </Habits> | ||
| )} | ||
| <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.
Esse componente estilizado não possui uma abertura.
| if(done === false){ | ||
| const request = axios.post(`https://mock-api.bootcamp.respondeai.com.br/api/v2/trackit/habits/${id}/check`, {}, config); | ||
|
|
||
| request.then(resposta => | ||
| setItems([...items.filter((i => i.id !== id)), {...item, done: true, currentSequence: item.currentSequence + 1}])) | ||
|
|
||
| request.catch(error => alert(error)) | ||
| } | ||
| else{ | ||
| const request = axios.post(`https://mock-api.bootcamp.respondeai.com.br/api/v2/trackit/habits/${id}/uncheck`, {}, config); | ||
|
|
||
| request.then(resposta => | ||
| setItems([{...item, done: false, currentSequence: item.currentSequence -1},...items.filter((i => i.id !== id))])) | ||
|
|
||
| request.catch(error => alert(error)) | ||
| } | ||
| } |
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.
Esse if poderia originar duas novas funções.
| return ( | ||
| <UserContext.Provider value={{user, setUser}}> | ||
| <ProgressContext.Provider value = {{progress, setProgress}}> | ||
| <BrowserRouter> | ||
| <Switch> | ||
| <Route path="/" exact> | ||
| <Home /> | ||
| </Route> | ||
| <Route path="/cadastro" exact> | ||
| <Register /> | ||
| </Route> | ||
| <Route path="/habitos" exact> | ||
| <Habits /> | ||
| </Route> | ||
| <Route path="/hoje" exact> | ||
| <Today /> | ||
| </Route> | ||
| <Route path="/historico" exact> | ||
| <Historic /> | ||
| </Route> | ||
| </Switch> | ||
| </BrowserRouter> | ||
| </ProgressContext.Provider> | ||
| </UserContext.Provider> | ||
| ) |
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.
Você não necessita do contexto ProgressContext em todos esses componentes, o ideal é que você sempre mantenha bem definido os escopos de cada um dos contextos utilizados em uma aplicação.
No description provided.