diff --git a/part1/src/App.js b/part1/src/App.js index 629ac91..d7a2aa7 100644 --- a/part1/src/App.js +++ b/part1/src/App.js @@ -1,9 +1,16 @@ import { useState } from 'react' -const Stats = ({ positive, neutral, negative }) => { - const total = positive - negative - const votes = positive + neutral + negative - if (votes == 0) { +const StatisticLine = ({ value, text }) => { + return ( +
No Votes Cast Yet
@@ -13,12 +20,12 @@ const Stats = ({ positive, neutral, negative }) => { return ( <>Positive: {positive}
-Neutral: {neutral}
-Negative: {negative}
-All: {votes}
-Average: {total / votes}
-Positive: {positive / votes}
+