From f4ab316389d8a8238a539668fdfef25e7b27e27f Mon Sep 17 00:00:00 2001 From: Ibrahim Mkusa Date: Wed, 26 Apr 2023 19:49:43 -0400 Subject: ex1.10 refactored Display->StaticLine --- part1/unicafe/src/App.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'part1/unicafe') diff --git a/part1/unicafe/src/App.js b/part1/unicafe/src/App.js index b583060..d2ef92b 100644 --- a/part1/unicafe/src/App.js +++ b/part1/unicafe/src/App.js @@ -8,12 +8,14 @@ const Button = (props) => { ) } -const Display = (props) => { +const StatisticLine = (props) => { return (

{props.text} {props.count}

) } + + const Statistics = (props) => { const good = props.good const bad = props.bad @@ -26,12 +28,12 @@ const Statistics = (props) => { const positive_percent = (good/total) * 100 return ( <> - - - - - - + + + + + + ) } -- cgit v1.2.3