Skip to content

Added Sum component - #4428

Open
thunderTheNakedGun wants to merge 3 commits into
mate-academy:masterfrom
thunderTheNakedGun:develop
Open

thunderTheNakedGun wants to merge 3 commits into
mate-academy:masterfrom
thunderTheNakedGun:develop

Conversation

@thunderTheNakedGun

Copy link
Copy Markdown

also upgraded @mate-academy/scripts to 2.1.3

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Copy link
Copy Markdown

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

There are no files to review. Please make sure that you have added files to the pull request. Some files and directories may be ignored from the review or failed to load.
[CODE: NFR]

Additional info:
Ignored files list:

  • package-lock.json
  • package.json

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 mateacademy-ai-mentor left a comment

Copy link
Copy Markdown

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 the props in App.jsx are passed as strings instead of numbers, which violates the requirement to use numeric values and can lead to incorrect output. Specifically, on lines 7–10, values like a="2" and b="5" should be numeric literals: a={2}, b={5}. This is a critical blocker since the task requires number props (e.g., a={2}, b={3}) and the current implementation can produce wrong sums or string concatenation.

Critical issues to fix:

  • App.jsx lines 7–10: change a="2" to a={2}, a="-5" to a={-5}, a="10" to a={10}, and b="5" to b={5} to meet the requirement and ensure correct arithmetic.

Minor improvement:

  • In Sum.jsx, if props are numeric as required, Number(a) + Number(b) is unnecessary; you can use a + b directly for clarity.

You’ve done well with named exports, default values, and template interpolation. Make the above corrections and you should 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

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Copy link
Copy Markdown

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. All requirements are met: the Sum component correctly accepts a and b props with default values of 0, renders the sum using template literals, and uses named exports. All 5 required Sum component instances are present in App.jsx with proper numeric props (not strings), and the code follows the specified style guidelines including single-line tags for components with fewer than 3 attributes. The previous issue with string props has been successfully resolved.


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

3 participants