Skip to content

Conversation

@gugabs
Copy link

@gugabs gugabs commented Jun 8, 2021

No description provided.

@vercel
Copy link

vercel bot commented Jun 8, 2021

Someone is attempting to deploy a commit to a Personal Account owned by @issitarual on Vercel.

@issitarual first needs to authorize it.

Copy link
Author

@gugabs gugabs left a 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 />
Copy link
Author

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.

Comment on lines -105 to -121
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))
}
}
Copy link
Author

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.

Comment on lines -17 to -41
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>
)
Copy link
Author

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.

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.

1 participant