Skip to content

add task solution#4250

Open
AndrewPrszn wants to merge 2 commits intomate-academy:masterfrom
AndrewPrszn:develop
Open

add task solution#4250
AndrewPrszn wants to merge 2 commits intomate-academy:masterfrom
AndrewPrszn:develop

Conversation

@AndrewPrszn
Copy link

@AndrewPrszn AndrewPrszn commented Jan 31, 2026

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

Good work on creating the component file structure. However, changes are needed because the core requirement of the task—decomposing App.jsx—has not been completed.

Here are the critical issues to address:

  1. App.jsx is not using the new components. The main App.jsx file still contains all the original hardcoded JSX. Please import your Welcome, Header, and Article components and use them to render the page, removing the old static content.
  2. Article.jsx has incorrect content. This component should render the five unique, static paragraphs that were originally in App.jsx. Currently, it's incorrectly repeating the same prop value. Also, please correct the headline's class name from article-title to article__title to match the BEM convention.

Once you've updated App.jsx to use your new components and fixed the content in Article.jsx, your solution will be on the right track.


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

Important

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

Tip

If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.

Caution

Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.

Footnotes

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

src/App.jsx Outdated
Comment on lines 3 to 6
import './components/Welcome/Welcome.css';
import './components/Header/Header.css';
import './components/Navigation/Navigation.css';
import './components/Article/Article.css';

Choose a reason for hiding this comment

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

These component-specific CSS files should be imported inside their corresponding component files. For example, Welcome.css should be imported in Welcome.jsx.

function Article({ paragraph }) {
return (
<article className="article">
<h1 className="article-title">Headline</h1>

Choose a reason for hiding this comment

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

The class name here should be article__title to match the BEM convention used in the original App.jsx and the rest of the project.

Comment on lines 9 to 13
<p className="article__paragraph">{paragraph}</p>
<p className="article__paragraph">{paragraph}</p>
<p className="article__paragraph">{paragraph}</p>
<p className="article__paragraph">{paragraph}</p>
<p className="article__paragraph">{paragraph}</p>

Choose a reason for hiding this comment

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

This component should render the five unique, static paragraphs that were originally in App.jsx. Currently, it's incorrectly repeating the same paragraph prop five times. The component shouldn't need to accept any props; it should just contain the original static content.

Comment on lines +22 to +26
.header {
text-align: left;
display: flex;
justify-content: space-between;
}

Choose a reason for hiding this comment

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

These styles for the .header class do not belong in the Article.css file. Per the task instructions, styles should be split just like the components. Please move this block to the Header.css file.

@@ -0,0 +1,19 @@
import './Navigation.css';

Choose a reason for hiding this comment

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

While not always strictly necessary with modern React setups, it's a good practice to explicitly import React in every file where you use JSX. This ensures consistency and avoids potential issues with different build tools. Please add import React from 'react'; at the top of this file.

@@ -0,0 +1,19 @@
import './Navigation.css';

export function Navigation() {

Choose a reason for hiding this comment

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

The task requires using export default. While you do have a default export on line 19, this named export is redundant and can be confusing. It's best practice to have a single export for a component file. Please remove the export keyword from this function declaration and rely solely on the default export.

@@ -1,5 +1,25 @@
// import a css file containig welcome styles
import './Welcome.css';

Choose a reason for hiding this comment

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

It's a standard convention and a good practice to explicitly import React at the top of every file that uses JSX. Please add import React from 'react'; here.

Comment on lines +13 to +22
// libero, in dignissim lacus erat et metus. In hac habitasse platea
// dictumst. Aenean euismod ligula sed massa efficitur, at convallis
// libero venenatis.
// </p>
// </article>
// </main>
// );
// }
//
// export default App;

Choose a reason for hiding this comment

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

This commented-out code seems to be a leftover from another file and is not relevant to the Welcome component. It's best to remove it to keep the code clean and readable.

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 this task! I am approving your solution as you've successfully refactored the App.jsx component and correctly split the logic into Header, Welcome, and Article components.

While your work meets the core requirements, here are a few small improvements to consider for future projects:

  • In src/components/Article/Article.css, some styles for the header should be moved to Header.css to keep component styles fully encapsulated.
  • The src/components/Welcome/Welcome.jsx file contains a large block of commented-out code that can be removed to improve readability.
  • In src/components/Navigation/Navigation.jsx, you can remove the named export from the function declaration since you already have a default export.

Excellent work overall, and keep up the great progress!


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

Footnotes

  1. Rate AI review example

Comment on lines +22 to +26
.header {
text-align: left;
display: flex;
justify-content: space-between;
}

Choose a reason for hiding this comment

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

These header styles do not belong in the Article.css file. To keep your components properly encapsulated, all styles related to the header should be in Header.css.

@@ -0,0 +1,19 @@
import './Navigation.css';

export function Navigation() {

Choose a reason for hiding this comment

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

While this works, having both a named export here and a default export on line 19 for the same component is redundant. Since the requirement is to use export default, you can remove the export keyword from this line to keep your module exports cleaner.

Comment on lines +14 to +23
// libero, in dignissim lacus erat et metus. In hac habitasse platea
// dictumst. Aenean euismod ligula sed massa efficitur, at convallis
// libero venenatis.
// </p>
// </article>
// </main>
// );
// }
//
// export default App;

Choose a reason for hiding this comment

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

This block of commented-out code seems to be a remnant from another file. It's best to remove it to keep the component clean and focused on its own logic.

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.

2 participants