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

Solution #1400

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

Solution #1400

wants to merge 2 commits into from

Conversation

nataliia-v
Copy link

Copy link

@maponomarenko maponomarenko left a comment

Choose a reason for hiding this comment

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

good job!

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. Specifically, the PostList.jsx file is missing a key prop in the PostInfo component, which is essential for React's reconciliation process. Additionally, the task requires moving styles from App.scss to component-specific files, which hasn't been fully implemented. Please address these issues to ensure your code meets the task requirements. Keep up the great work, and feel free to reach out if you have any questions! 🚀

✨ 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.

Comment on lines 5 to 6
{posts.map(post => (
<PostInfo post={post} />

Choose a reason for hiding this comment

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

Each child in a list should have a unique key prop to help React identify which items have changed, are added, or are removed. Consider adding a key prop to the PostInfo component, using a unique identifier from the post object, such as post.id.

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.

Review Summary

Great job on addressing the previous issues and making significant improvements to your code! 🎉

Your solution now meets the task requirements, particularly with the inclusion of the key prop in PostList.jsx, which is crucial for React's reconciliation process. Additionally, you've successfully moved styles from App.scss to component-specific files, ensuring a more modular and maintainable codebase.

However, there are a few areas to focus on for future enhancements:

  • Component-Specific Styles: Ensure that all styles are moved to component-specific files using CSS modules. For instance, rename files like UserInfo.scss, PostInfo.scss, and CommentList.scss to UserInfo.module.scss, PostInfo.module.scss, and CommentList.module.scss, respectively, and update the imports in the corresponding components.

These changes are essential for maintaining a clean and organized code structure. While the current implementation is approved to help you progress in your learning journey, addressing these points will enhance your skills and code quality.

Keep up the great work, and continue to learn from these experiences! 🚀

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

@@ -1,104 +1,20 @@
import './App.scss';

Choose a reason for hiding this comment

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

The task requires moving styles from App.scss to component-specific files. Consider creating a new file, such as App.module.scss, and moving the styles there. Then, import the new file here.

export const CommentList = () => <>Put the list here</>;
import { CommentInfo } from '../CommentInfo/CommentInfo';

import './CommentList.scss';

Choose a reason for hiding this comment

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

The task requires moving styles from CommentList.scss to component-specific files. Consider creating a new file, such as CommentList.module.scss, and moving the styles there. Then, import the new file here.

@@ -1 +1,7 @@
// add styles here
.CommentList {

Choose a reason for hiding this comment

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

To comply with the task requirements, rename this file to CommentList.module.scss and update the import in CommentList.jsx to use CSS modules.

import { CommentList } from '../CommentList';
import { UserInfo } from '../UserInfo';

import './PostInfo.scss';

Choose a reason for hiding this comment

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

The task requires moving styles from PostInfo.scss to component-specific files using CSS modules. Consider creating a new file, such as PostInfo.module.scss, and moving the styles there. Then, import the new file here.

@@ -1 +1,16 @@
// add styles here
.PostInfo {

Choose a reason for hiding this comment

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

To comply with the task requirements, rename this file to PostInfo.module.scss and update the import in PostInfo.jsx to use CSS modules.

@@ -1 +1,7 @@
export const UserInfo = () => <>Put the user here</>;
import './UserInfo.scss';

Choose a reason for hiding this comment

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

The task requires moving styles from UserInfo.scss to component-specific files using CSS modules. Consider creating a new file, such as UserInfo.module.scss, and moving the styles there. Then, import the new file here.

@@ -1 +1,3 @@
// add styles here
.UserInfo {

Choose a reason for hiding this comment

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

To comply with the task requirements, rename this file to UserInfo.module.scss and update the import in UserInfo.jsx to use CSS modules.

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.

3 participants