diff --git a/part1/1.6-1.11-unicafe/src/App.js b/part1/1.6-1.11-unicafe/src/App.js index 4157bcb..df5f90f 100644 --- a/part1/1.6-1.11-unicafe/src/App.js +++ b/part1/1.6-1.11-unicafe/src/App.js @@ -11,7 +11,7 @@ const App = () => { const [good, neutral, bad] = props.data const all = good + bad + neutral const avg = (all !== 0) ? (good - bad) / all : 0 - const positive = (all !== 0) ? good/all*100 : "NA" + const positive = (all !== 0) ? good/all*100 + " %": "NA" return ( @@ -19,12 +19,13 @@ const App = () => {
Good: {good}
-Neutral: {neutral}
-Bad: {bad}
-All: {all}
-Average: {avg}
-Positive: {positive} %
+{props.text}: {props.value}
+ + const Button = (props) => { + return ( + + ) + } + return (