diff --git a/part1/1.6-1.11-unicafe/src/App.js b/part1/1.6-1.11-unicafe/src/App.js index 0a1dc1c..4157bcb 100644 --- a/part1/1.6-1.11-unicafe/src/App.js +++ b/part1/1.6-1.11-unicafe/src/App.js @@ -12,16 +12,22 @@ const App = () => { const all = good + bad + neutral const avg = (all !== 0) ? (good - bad) / all : 0 const positive = (all !== 0) ? good/all*100 : "NA" + return (

Statistic

-

Good: {good}

-

Neutral: {neutral}

-

Bad: {bad}

-

All: {all}

-

Average: {avg}

-

Positive: {positive} %

+ {all > 0 && +
+

Good: {good}

+

Neutral: {neutral}

+

Bad: {bad}

+

All: {all}

+

Average: {avg}

+

Positive: {positive} %

+
+ } + {all === 0 && "No feedback given"}
) } @@ -29,7 +35,7 @@ const App = () => { return (

Give feedback

- +