Skip to content

Component Sum implemented - #4392

Open
codemasterboom wants to merge 13 commits into
mate-academy:developfrom
codemasterboom:develop
Open

Component Sum implemented#4392
codemasterboom wants to merge 13 commits into
mate-academy:developfrom
codemasterboom:develop

Conversation

@codemasterboom

Copy link
Copy Markdown

@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 implementation successfully meets all the functional requirements for the Sum component task. The component correctly accepts a and b props with default values of 0, uses named export, renders the proper text format using template literals, and the App component contains all five required Sum instances with correct prop combinations. Code style requirements from the checklist are satisfied—components with short attributes are written on single lines and template literals are used for string interpolation. While there are minor whitespace considerations around the template literal in the <p> tag, these are stylistic preferences rather than critical issues that prevent task completion. Your solution is approved and ready for the next steps.


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

Footnotes

  1. Rate AI review example

Comment thread src/App.jsx
@@ -1,14 +1,13 @@
import React from 'react';
import './App.css';
import './App.scss';

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

There's a minor whitespace issue here - the space before the template literal creates leading whitespace in the output. Consider removing the space before {...} for cleaner output.

Comment thread src/components/Sum/Sum.jsx Outdated
Comment on lines +1 to +2
export const Sum = ({ a = 0, b = 0 }) => (
<p> {`Sum of ${a} and ${b} is ${a + b}`} </p>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Extra whitespace in the paragraph content will cause test failures. The <p> element contains leading and trailing spaces around the template literal (<p> {...} </p>), which will be rendered as actual text. Tests expect exact text match without these spaces.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

fixed in 2039f8a

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.

4 participants