Skip to content

Solution#3849

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

Solution#3849
haldaniko wants to merge 2 commits into
mate-academy:masterfrom
haldaniko:develop

Conversation

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

Decision: Request changes

Why: There are two critical blockers that violate explicit checklist requirements and can break functionality:

  1. src/App.jsx

    • Issue: Sum is imported as a default import.
    • Why it’s wrong: Checklist item #3 requires a named export/import.
    • How to fix: Replace the import with a named import: import { Sum } from './components/Sum/Sum';.
    • Likely location: Top of file where import Sum from ... appears.
  2. src/components/Sum/Sum.jsx

    • Issue A: Paragraph content uses multiple JSX expressions ({a}, {b}, {a + b}) instead of one interpolated string.
    • Why it’s wrong: Violates checklist item #2 requiring a single template literal inside the <p>.
    • How to fix: Use one template literal for the entire sentence, e.g., <p>{Sum of ${a} and ${b} is ${a + b}}</p>.
    • Issue B: Component is exported as default.
    • Why it’s wrong: Violates checklist item #3; must be a named export.
    • How to fix: Change to a named export, e.g., export const Sum = ... and remove any default export.

Minor notes:

  • Functionality and formatting otherwise look good: correct defaulting of a and b, correct sentence text, and App renders five instances with proper one-line JSX where applicable.

You’re very close—once you switch to named export/import and use a single template literal in the <p>, this should meet all requirements. Keep it up!


✨ 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/App.jsx Outdated
@@ -1,14 +1,13 @@
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 violates the requirement and checklist item that Sum must be imported as a named export, not as a default export. Change to: import { Sum } from './components/Sum/Sum';

Comment thread src/components/Sum/Sum.jsx Outdated
@@ -1 +1,5 @@
// export const Sum = () => ();
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.

This violates checklist item #2: 'Use a single interpolated string inside the

tag content rather than splitting into multiple expressions.' Use a template literal for the entire sentence instead of separate JSX expressions for a, b, and a + b.

Comment thread src/components/Sum/Sum.jsx Outdated
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 #3: 'Export Sum as a named export and import it correspondingly by name (no default export).' Change to a named export: export const Sum = ...

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: APPROVE

Your implementation fully meets all functional, technical, and stylistic requirements.

  • Sum is correctly implemented as a functional component with named export, handling default values for a and b via destructuring to 0, and rendering a single template literal in the exact format: Sum of X and Y is Z.
  • App.jsx imports Sum using named import syntax and renders all five required instances: a={2} b={3}, a={-5} b={5}, a={10} only, b={5} only, and with no props. Each tag with fewer than 3 short attributes is on a single line as required.

There are no critical blockers or missing requirements. Nice work keeping the code clean and focused on the specs. Keep it up!


✨ 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