From b54dd7868cacb2e5920ad6a3797fc85c5671ad14 Mon Sep 17 00:00:00 2001 From: Maksym Huk Date: Sun, 17 May 2026 21:16:57 +0300 Subject: [PATCH 1/3] result --- src/App.jsx | 26 +++++++++++++++----------- src/components/Sum/Sum.jsx | 8 +++++++- 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/src/App.jsx b/src/App.jsx index dc51f769d..7c33c0597 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -1,14 +1,18 @@ import React from 'react'; import './App.scss'; -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 :) */} - -); +import { Sum } from './components/Sum/Sum'; + +function App() { + return ( + <> + + + + + + + ); +} + +export default App; diff --git a/src/components/Sum/Sum.jsx b/src/components/Sum/Sum.jsx index 381aa0422..432ac2eef 100644 --- a/src/components/Sum/Sum.jsx +++ b/src/components/Sum/Sum.jsx @@ -1 +1,7 @@ -// export const Sum = () => (); +export const Sum = ({ a = 0, b = 0 }) => { + return ( +

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

+ ); +}; From 287842e55fdffaf91568c298cc060ca530f89c6f Mon Sep 17 00:00:00 2001 From: Maksym Huk Date: Sun, 17 May 2026 21:25:07 +0300 Subject: [PATCH 2/3] new_result --- src/App.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/App.jsx b/src/App.jsx index 7c33c0597..df89403f6 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -3,7 +3,7 @@ import './App.scss'; import { Sum } from './components/Sum/Sum'; -function App() { +export const App = () => { return ( <> @@ -13,6 +13,6 @@ function App() { ); -} +}; export default App; From 0ebf5c3accc4eddbc40759f657a771d3197df4f4 Mon Sep 17 00:00:00 2001 From: Maksym Huk Date: Sun, 17 May 2026 21:35:37 +0300 Subject: [PATCH 3/3] new_result --- src/components/Sum/Sum.jsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/components/Sum/Sum.jsx b/src/components/Sum/Sum.jsx index 432ac2eef..9853f9183 100644 --- a/src/components/Sum/Sum.jsx +++ b/src/components/Sum/Sum.jsx @@ -1,7 +1,3 @@ export const Sum = ({ a = 0, b = 0 }) => { - return ( -

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

- ); + return

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

; };