From f4ab316389d8a8238a539668fdfef25e7b27e27f Mon Sep 17 00:00:00 2001
From: Ibrahim Mkusa <ibrahimmkusa@gmail.com>
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/src')

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 (
     <p>{props.text} {props.count}</p>
   )
 }
 
+
+
 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 (
     <>
-    <Display text="good" count={good} />
-    <Display text="neutral" count={bad} />
-    <Display text="bad" count={bad} />
-    <Display text="all" count={total} />
-    <Display text="average" count={average} />
-    <Display text="positive(%)" count={positive_percent} />
+    <StatisticLine text="good" count={good} />
+    <StatisticLine text="neutral" count={bad} />
+    <StatisticLine text="bad" count={bad} />
+    <StatisticLine text="all" count={total} />
+    <StatisticLine text="average" count={average} />
+    <StatisticLine text="positive(%)" count={positive_percent} />
     </>
   )
 }
-- 
cgit v1.2.3