From cf317bd2a8828f2c4ac21c46a6831657fb3311dd Mon Sep 17 00:00:00 2001 From: masteryada378 Date: Tue, 26 May 2026 09:54:35 +0300 Subject: [PATCH 1/2] sum --- src/App.jsx | 13 ++++++------- src/components/Sum/Sum.jsx | 8 +++++++- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/App.jsx b/src/App.jsx index dc51f769d..708add0a8 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -1,14 +1,13 @@ import React from 'react'; import './App.scss'; +import { Sum } from './components/Sum/Sum'; export const App = () => ( <> -

Sum of 2 and 3 is 5

-

Sum of -5 and 5 is 0

-

Sum of 10 and 0 is 10

-

Sum of 0 and 5 is 5

-

Sum of 0 and 0 is 0

- {/* Replace paragraphs with Sum componets */} - {/* And remove commented lines :) */} + + + + + ); diff --git a/src/components/Sum/Sum.jsx b/src/components/Sum/Sum.jsx index 381aa0422..7eaf88224 100644 --- a/src/components/Sum/Sum.jsx +++ b/src/components/Sum/Sum.jsx @@ -1 +1,7 @@ -// export const Sum = () => (); +import React from 'react'; + +export const Sum = ({ a = 0, b = 0 }) => ( +

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

+); From b3b2af0d3909c10f4868f3eee11fe74dd1dbb624 Mon Sep 17 00:00:00 2001 From: masteryada378 Date: Tue, 26 May 2026 10:00:36 +0300 Subject: [PATCH 2/2] fix lint --- src/components/Sum/Sum.jsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/components/Sum/Sum.jsx b/src/components/Sum/Sum.jsx index 7eaf88224..68d50a934 100644 --- a/src/components/Sum/Sum.jsx +++ b/src/components/Sum/Sum.jsx @@ -1,7 +1,5 @@ import React from 'react'; export const Sum = ({ a = 0, b = 0 }) => ( -

- Sum of {a} and {b} is {a + b} -

+

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

);