Skip to content

addtask solution#4201

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

addtask solution#4201
kseniiavasylenko wants to merge 2 commits intomate-academy:masterfrom
kseniiavasylenko:develop

Conversation

@kseniiavasylenko
Copy link
Copy Markdown

No description provided.

Copy link
Copy Markdown

@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

I am requesting changes because there is one remaining checklist violation that is considered a required part of the task, not just a cosmetic style preference. Functionally, your Sum component and the App usage are correct: the component is a named export, defaults for a and b are set to 0, and all required <Sum /> instances are present and properly configured. However, in src/components/Sum/Sum.jsx, the paragraph currently renders as Sum of {a} and {b} is {a + b}, which violates [CHECKLIST ITEM #2] that requires using a single string interpolation inside the tag content. To fix this, update that line (for example, on the line with the <p> tag) to use a template literal: <p>{Sum of ${a} and ${b} is ${a + b}}</p>. Once you make that change, your solution will both meet the functional requirements and fully adhere to the specified checklist. Overall, you’re very close—just apply this small formatting correction and you’ll be all set.


✨ 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

Comment thread src/components/Sum/Sum.jsx Outdated
export const Sum = ({ a = 0, b = 0 }) => (
<div>
<p>
Sum of {a} and {b} is {a + b}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This violates checklist item #2: "Use string interpolation inside tag content". The paragraph currently mixes text and JSX expressions (Sum of {a} and {b} is {a + b}) instead of using a single template literal. Consider using a template literal inside the tag, for example: <p>{Sum of ${a} and ${b} is ${a + b}}</p> to satisfy the checklist.

Copy link
Copy Markdown

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

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.

Copy link
Copy Markdown

@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

Your solution is approved because it cleanly implements all the required functionality and matches the task specification.

The Sum component is correctly defined as a named export, uses default values a = 0 and b = 0, and renders the full sentence in a single template literal inside a <p> tag, e.g. <p>{Sum of ${a} and ${b} is ${a + b}}</p>. In App.jsx, you rendered all five required <Sum /> usages, including the cases with both props, single prop, and no props, which confirms the default values work as intended. Your prop formatting on single lines for short props and the use of string interpolation inside the tag content align well with the code-style checklist expectations.

As minor suggestions, make sure you are running npm test locally and that your editor is using the provided Prettier/VSCode settings, and remember to update the DEMO LINK in the PR description if your course or project workflow requires it. Overall, this is a clear, correct implementation—well done.


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

Footnotes

  1. Rate AI review example

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