Skip to content
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

Task solution #2954

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Dominik-Dudek-code
Copy link

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

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

Thank you for your hard work on this project! There are a few critical issues that need to be addressed before we can approve the pull request. The handling of the highestId state and the direct mutation of the todosFromServer array are significant concerns that could impact the functionality of your application. Additionally, the UserInfo component has a logical error in destructuring the user prop, which could lead to runtime errors. Please address these issues to ensure your code meets the core requirements. Keep up the great work, and don't hesitate to reach out if you need any help! 😊

✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨

🔄 Fix the issues, commit the changes, and then re-request my review using the Re-request review button in the Reviewers tab.

src/App.tsx Outdated Show resolved Hide resolved
src/App.tsx Outdated Show resolved Hide resolved
src/components/UserInfo/UserInfo.tsx Outdated Show resolved Hide resolved
src/components/UserInfo/UserInfo.tsx Outdated Show resolved Hide resolved
Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

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


Great job on your progress! 🚀 While there are a few critical issues that need attention, such as the handling of highestId state and the direct mutation of todosFromServer, your implementation shows promise. Here are some key points to address:

  1. Handling of highestId State:

    • Ensure that when adding a new todo, the visibleTodos state is updated by appending the new todo to the current visibleTodos array, not todosFromServer.
  2. Direct Mutation of todosFromServer:

    • Avoid directly mutating todosFromServer. Use setVisibleTodos([...visibleTodos, newTodo]) to manage the list of todos.
  3. TodoInfo Component:

    • If todo.user is null, the href attribute will be mailto:undefined. Consider adding a fallback value or conditionally rendering the anchor tag only when todo.user is not null.
  4. Form Submission Handling:

    • Use the onSubmit prop of the form to handle submissions, which is a more standard practice.

These improvements will enhance the functionality and maintainability of your code. Keep up the good work and continue learning from these experiences! 💪

✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨

src/App.tsx Show resolved Hide resolved
src/App.tsx Outdated Show resolved Hide resolved
src/components/TodoInfo/TodoInfo.tsx Outdated Show resolved Hide resolved
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.

4 participants