-
Notifications
You must be signed in to change notification settings - Fork 3.9k
add solution #4267
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
base: master
Are you sure you want to change the base?
add solution #4267
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this 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 decomposing the application into components and separating the CSS files. The project structure is clean and meets most of the core requirements.
However, changes are needed regarding the component exports. The task explicitly requires using export default for all components. Currently, Article, Header, and Welcome use both a named export (e.g., export function Article()) and a default export. Please remove the named exports and use only the default export for each component.
For example, in src/components/Article/Article.jsx, you should remove the export keyword from the function declaration and ensure only export default Article; is present. Consequently, you'll need to update the import statements in App.jsx to use the default import syntax, like import Article from './components/Article/Article';.
Once this is corrected, your solution will be ready!
✨ 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/components/Article/Article.jsx
Outdated
| import './Article.css'; | ||
|
|
||
| // Create an Article function returning the HTML of article block | ||
| export function Article() { |
There was a problem hiding this comment.
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 for components. By adding the export keyword here, you are creating a named export in addition to the default export on line 70. This is redundant. Please remove the export keyword from this line to only provide a default export. You will also need to update how this component is imported in App.jsx.
| .navigation__link { | ||
| display: inline-block; | ||
| outline: none; | ||
| text-decoration: none; | ||
| opacity: 0.7; | ||
| padding: 0 0.5em; | ||
| color: black; | ||
| transition: opacity 0.2s ease-in-out; | ||
| } | ||
|
|
||
| .navigation__link:hover, | ||
| .navigation__link:focus { | ||
| opacity: 1; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These styles are for the navigation block. The task description suggests that Navigation could be extracted into its own component. To improve component modularity, it would be better to create a Navigation component with its own CSS file (Navigation.css) and move these styles there.
src/App.jsx
Outdated
| import { Welcome } from './components/Welcome/Welcome'; | ||
| import { Header } from './components/Header/Header'; | ||
| import { Article } from './components/Article/Article'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The task instructions mention that export default should be used for all components. While your components have both named and default exports, the convention is to use default imports when a default export is the main export of a module. It would be better to change these to default imports, for example: import Welcome from './components/Welcome/Welcome';.
src/components/Header/Header.jsx
Outdated
| import './Header.css'; | ||
|
|
||
| // Create a Header function returning the HTML of header block | ||
| export function Header() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The task specifies using export default for components. By adding the export keyword here, you are creating a named export in addition to the default export on line 25. This is unnecessary. Please remove the export keyword from this line to have only a default export. You'll also need to update the import statement in App.jsx accordingly.
| <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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The task description suggests that the navigation could be moved to a separate Navigation component. Extracting this <nav> block into its own Navigation.jsx file (with its corresponding CSS) would improve the modularity and reusability of your components.
src/components/Welcome/Welcome.jsx
Outdated
| import './Welcome.css'; | ||
|
|
||
| // Create a Welcome function returning the HTML of welcome block | ||
| export function Welcome() { |
There was a problem hiding this comment.
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 for components. By adding the export keyword here, you are creating a named export in addition to the default export on line 14. This is redundant. Please remove the export keyword from this line to only provide a default export. You will also need to update how this component is imported in App.jsx.
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, the pull request review was unsuccessful for the following reasons:
Warning
No changes were made in the pull request since the last review. Please make sure that you have added files to the pull request and committed the changes.
[CODE: NCM]
If the issue is within your control, please address it.
The next review attempt will automatically launch in about 1 hour.
If you believe this is an error or need assistance, please contact the support team.
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Summary
I am approving your solution because all core functional requirements appear to be met: the app is correctly decomposed into Welcome, Header, and Article components, each component has its own CSS file, and all these components use default exports as expected by the tests. App.jsx imports and renders the components cleanly with a single app-level CSS import, which aligns with the task’s structure requirements. Nothing in the provided code suggests runtime errors or broken functionality.
The remaining points are process or style related rather than blockers: you should still make sure to (1) run npm test locally and confirm everything passes, and (2) add a proper demo link (replacing <your_account> with your actual GitHub username) to your PR description if your checklist requires a deployed demo. As a minor improvement, if you later extract the navigation into its own Navigation component, consider moving .navigation__link styles from Header.css into a dedicated Navigation.css to keep styles tightly scoped. Overall, the structure, exports, and CSS splitting look good, and you’ve implemented the main decomposition task correctly—nice work.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
<your_account>with your Github username in the DEMO LINK and add it to the PR description