Skip to content

Commit

Permalink
1.7: unicafe step2
Browse files Browse the repository at this point in the history
  • Loading branch information
josenaldo committed Oct 26, 2022
1 parent 4623055 commit 26de439
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions part1/unicafe/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,15 @@ function App() {
<Statistic text="Good" value={good} />
<Statistic text="Neutral" value={neutral} />
<Statistic text="Bad" value={bad} />
<Statistic text="All" value={good + neutral + bad} />
<Statistic
text="Average"
value={(good - bad) / (good + neutral + bad)}
/>
<Statistic
text="Positive"
value={(good / (good + neutral + bad)) * 100 + '%'}
/>
</div>
</div>
)
Expand Down

0 comments on commit 26de439

Please sign in to comment.