Skip to content

first v#4188

Closed
doniliks wants to merge 3 commits intomate-academy:masterfrom
doniliks:master
Closed

first v#4188
doniliks wants to merge 3 commits intomate-academy:masterfrom
doniliks:master

Conversation

@doniliks
Copy link
Copy Markdown

@doniliks doniliks commented Apr 7, 2026

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

This requires a few changes to meet the task requirements. Great job on the core logic for the Sum component, but there are a couple of critical issues to address.

  1. Missing Export: The Sum component in src/components/Sum/Sum.jsx is not exported. This is causing the application to break and tests to fail. Please add a named export like this: export const Sum = ....
  2. Incorrect Prop Testing: In App.jsx, the default props are not being tested correctly. To test a default value, you should omit the prop entirely. For example, use <Sum a={10} /> instead of <Sum a={10} b={0} />.
  3. String Formatting: The component should use a template literal for the output string, as required by [CHECKLIST ITEM #2]. Please change the paragraph content to {`Sum of ${a} and ${b} is ${a + b}`}.

Once these issues are fixed, your solution should be ready. 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
@@ -1 +1,8 @@
// export const Sum = () => ();
const Sum = ({ a = 0, b = 0 }) => (
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The Sum component needs to be exported so it can be used in App.jsx. According to the task requirements, you should use a named export. For example: export const Sum = ....

const Sum = ({ a = 0, b = 0 }) => (
<div className="Card">
<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'. Using a template literal like {`Sum of ${a} and ${b} is ${a + b}`} would be more readable and align with the project's code style.

Comment thread src/App.jsx
import React from 'react';
import './App.scss';

import { Sum } from './components/Sum/Sum';
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 import will fail because the Sum component is not exported from src/components/Sum/Sum.jsx. You need to add a named export to the Sum component definition.

Comment thread src/App.jsx Outdated
Comment on lines +6 to +12
/*
<p>Sum of 2 and 3 is 5</p>
<p>Sum of -5 and 5 is 0</p>
<p>Sum of 10 and 0 is 10</p>
<p>Sum of 0 and 5 is 5</p>
<p>Sum of 0 and 0 is 0</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.

This commented-out block of code should be removed before submission, as suggested by the comments on lines 18 and 19.

Comment thread src/App.jsx Outdated
Comment on lines +15 to +17
<Sum a={10} b={0} />
<Sum a={0} b={5} />
<Sum a={0} b={0} />
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

These component usages do not correctly test the default props as required by the task description. Instead of explicitly passing 0, you should omit the prop entirely to let the default value take effect.

  • For 'just a = 10', it should be <Sum a={10} />.
  • For 'just b = 5', it should be <Sum b={5} />.
  • For 'no params at all', it should be <Sum />.

@doniliks doniliks closed this Apr 7, 2026
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