Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
You've done a great job setting up the file structure for your components, which is a solid foundation. However, there are a few critical issues that prevent the application from working correctly. All of your child components (Header, Navigation, Welcome, and Article) are missing return statements, which means they don't render any content. Since you're using curly braces {} for your function bodies, you need to explicitly return the JSX.
Additionally, the task requires using export default for all components, but you've used named exports. You'll need to change export const Component = () => ... to const Component = () => ... and then add export default Component; at the end of each component file. Remember to also update the corresponding import statements in App.jsx.
Lastly, there's a typo in the Article component's name (Arrticle), and the responsive CSS for the Header and Article components still needs to be moved from App.css to their respective CSS files. Addressing these points will get your project running as expected!
✨ 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
src/App.jsx
Outdated
| import { Header } from './components/Header/Header'; | ||
| import { Welcome } from './components/Welcome/Welcome'; | ||
| import { Arrticle } from './components/Article/Article'; | ||
| import { Navigation } from './components/Navigation/Navigation'; |
There was a problem hiding this comment.
The task requires all components to use export default. These are named imports (using {}). After you update your child components to use default exports, you'll need to change these imports to the default import syntax (e.g., import Header from './components/Header/Header';).
src/App.jsx
Outdated
| // Move each BEM block to a separate component (file) and import them here | ||
| import { Header } from './components/Header/Header'; | ||
| import { Welcome } from './components/Welcome/Welcome'; | ||
| import { Arrticle } from './components/Article/Article'; |
There was a problem hiding this comment.
There appears to be a typo in the component name. It should likely be Article instead of Arrticle. You'll need to correct this here, in the component file itself, and where it's used below.
src/App.jsx
Outdated
| <Welcome /> | ||
| <Header /> | ||
| <Navigation /> | ||
| <Arrticle /> |
There was a problem hiding this comment.
This component name also has the typo (Arrticle). It should be updated to Article after correcting the import and the component file.
| @@ -1 +1,17 @@ | |||
| /* Put article styles here */ | |||
| .article { | |||
There was a problem hiding this comment.
The responsive styles for the .article class are missing from this file. You should move the @media blocks containing .article rules from src/App.css into this file to keep all component-related styles together.
src/components/Article/Article.jsx
Outdated
| import './Article.css'; | ||
|
|
||
| // Create an Article function returning the HTML of article block | ||
| export const Arrticle = () => { |
There was a problem hiding this comment.
It looks like there's a typo in the component name. It should probably be Article to match the file and directory names.
src/components/Header/Header.jsx
Outdated
| import './Header.css'; | ||
|
|
||
| // Create a Header function returning the HTML of header block | ||
| export const Header = () => { |
There was a problem hiding this comment.
The task requires all components to be exported using export default. This is a named export. You should remove the export keyword from here and add export default Header; at the end of the file.
| @@ -0,0 +1,15 @@ | |||
| import './Navigation.css'; | |||
|
|
|||
| export const Navigation = () => { | |||
There was a problem hiding this comment.
The task requires all components to use a default export. This component uses a named export. You should remove export from this line and add export default Navigation; after the component is defined.
| <nav className="navigation"> | ||
| <a className="navigation__link" href="#about"> | ||
| About | ||
| </a> | ||
| <a className="navigation__link" href="#services"> | ||
| Services | ||
| </a> | ||
| <a className="navigation__link" href="#contact"> | ||
| Contact | ||
| </a> | ||
| </nav>; |
There was a problem hiding this comment.
This component doesn't return anything. When using curly braces {} for an arrow function body, you must explicitly use the return keyword to return the JSX. Without it, the component returns undefined and will not be rendered.
src/components/Welcome/Welcome.jsx
Outdated
| import './Welcome.css'; | ||
|
|
||
| // Create a Welcome function returning the HTML of welcome block | ||
| export const Welcome = () => { |
There was a problem hiding this comment.
The task requires all components to use a default export. This is a named export. You should remove the export keyword from this line and add export default Welcome; after the component definition.
src/components/Welcome/Welcome.jsx
Outdated
| <section className="welcome"> | ||
| <span className="welcome__text">Sticky Header!</span> | ||
| </section>; |
There was a problem hiding this comment.
This component does not return any JSX. Because you're using curly braces {} for the function body, you need to add an explicit return statement before this <section> element. Without it, the component returns undefined.
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Great progress on refactoring the application! You've correctly split the UI into components and moved the base styles. However, a few critical issues need to be addressed before this can be approved.
Here are the main points to fix:
- The
Headercomponent is not rendering. It's missing areturnstatement insrc/components/Header/Header.jsx. Remember, when an arrow function's body is wrapped in curly braces{}, you must explicitlyreturnthe JSX. - The export/import syntax is incorrect. The task requires using only
export default. Please remove theexportkeyword from your component declarations (e.g.,const Header = ...) and update the imports insrc/App.jsxto use the default syntax without curly braces (e.g.,import Header from './components/Header/Header';). - The CSS refactoring is incomplete. The responsive
@mediaqueries for.headerand.articleare still insrc/App.css. They need to be moved into their corresponding component CSS files to complete the task.
Keep up the great work, and let me know if you have any questions!
✨ 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
src/App.jsx
Outdated
| import { Header } from './components/Header/Header'; | ||
| import { Welcome } from './components/Welcome/Welcome'; | ||
| import { Article } from './components/Article/Article'; | ||
| import { Navigation } from './components/Navigation/Navigation'; |
There was a problem hiding this comment.
The task requires using default exports for all components. When importing a component that uses a default export, you should not use curly braces. For example, this should be import Header from './components/Header/Header';. Please apply this change to all component imports in this file.
src/components/Article/Article.jsx
Outdated
| import './Article.css'; | ||
|
|
||
| // Create an Article function returning the HTML of article block | ||
| export const Article = () => { |
There was a problem hiding this comment.
While adding export default at the end of the file is correct, you should remove the export keyword from this line to avoid having both a named and a default export. The requirement is to only use export default. The line should be const Article = () => {.
| @@ -0,0 +1,19 @@ | |||
| import './Navigation.css'; | |||
|
|
|||
| export const Navigation = () => { | |||
There was a problem hiding this comment.
The task requires using only export default for all components. To fix this, you should remove the export keyword from this line, so it becomes const Navigation = () => {. The export default Navigation; at the end of the file is correct and sufficient.
src/components/Header/Header.jsx
Outdated
| import './Header.css'; | ||
|
|
||
| // Create a Header function returning the HTML of header block | ||
| export const Header = () => { |
There was a problem hiding this comment.
The task requires using only export default for components. By using export here, you are creating a named export in addition to the default export on line 9. Please remove the export keyword from this line to have only a default export.
src/components/Header/Header.jsx
Outdated
| <header className="header"> | ||
| <h1 className="header__title">Site Name</h1> | ||
| </header>; |
There was a problem hiding this comment.
This component is missing a return statement. When an arrow function's body is wrapped in curly braces {}, you must explicitly use the return keyword to return the JSX. Without it, the component returns undefined and won't render anything on the screen.
src/components/Welcome/Welcome.jsx
Outdated
| import './Welcome.css'; | ||
|
|
||
| // Create a Welcome function returning the HTML of welcome block | ||
| export const Welcome = () => { |
There was a problem hiding this comment.
The task requires using only export default for all components. You should remove the export keyword from this line to avoid having both a named and a default export. The line should simply be const Welcome = () => {.
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Excellent work on this update! You've successfully addressed all the feedback from the previous review, resulting in a clean and well-structured application. The components and their corresponding styles are now correctly separated, and the code fully meets all task requirements. I am happy to approve your solution. Great job!
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
No description provided.