diff options
-rw-r--r-- | part1/unicafe/src/App.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/part1/unicafe/src/App.js b/part1/unicafe/src/App.js index 4210f9c..b583060 100644 --- a/part1/unicafe/src/App.js +++ b/part1/unicafe/src/App.js @@ -18,8 +18,10 @@ const Statistics = (props) => { const good = props.good const bad = props.bad const neutral = props.neutral + if (good === 0 && bad === 0 && neutral === 0) { + return <p>No feedback given</p> + } const total = good + neutral + bad - const average = (good - bad) / 9.0 const positive_percent = (good/total) * 100 return ( |