Skip to content

solution#3884

Open
Andrey1166 wants to merge 2 commits into
mate-academy:masterfrom
Andrey1166:develop
Open

solution#3884
Andrey1166 wants to merge 2 commits into
mate-academy:masterfrom
Andrey1166:develop

Conversation

@Andrey1166
Copy link
Copy Markdown

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

Decision: Requesting changes due to a checklist violation that must be addressed.

  • Critical issue to fix (blocker): In src/components/Sum/Sum.jsx, the paragraph content violates checklist item #2: “Use string interpolation inside tag content.” Currently on the line rendering the paragraph (around the <p> in Sum.jsx), it uses multiple JSX text/expression nodes: Sum of {a} and {b} is {a + b}. This fails the explicit checklist requirement.
  • Why this matters: The checklist is a required part of the task. Even though functionality is correct, not following this rule means the submission doesn’t meet the core requirements.
  • How to fix: Replace the paragraph content with a single template string interpolation. For example:

    {`Sum of ${a} and ${b} is ${a + b}`}

Minor notes: Everything else looks good—named export, default props, and App renders all five required instances correctly. Make this one edit and you should be all set. Keep up the good work!


✨ 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 = () => ();
export const Sum = ({ a = 0, b = 0 }) => (
<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: "2. [CODE STYLE] - Use string interpolation inside tag content" . The paragraph currently splits the sentence into multiple JSX text and expression nodes (Sum of {a} and {b} is {a + b}) instead of using a single template-string interpolation. Please combine the content into one expression. For example:

<p>{`Sum of ${a} and ${b} is ${a + b}`}</p>

Making this change will satisfy the checklist requirement and produce the exact required sentence pattern.

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

Approval: All core requirements are fully met. The Sum component is a named export, defaults a and b to 0, and renders the exact sentence using a single template literal: Sum of ${a} and ${b} is ${a + b}. In src/App.jsx, the five required instances are rendered correctly: (a=2,b=3), (a=-5,b=5), (a=10 only), (b=5 only), and (no props), with short tags on one line where applicable.

Minor suggestions (non-blocking):

  • Consider adding PropTypes or TypeScript types to document that a and b are numbers.
  • Run npm test and ensure Prettier/format-on-save is active to align with project standards.

Great job implementing this cleanly and idiomatically.


✨ 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