diff --git a/part1/unicafe/src/App.js b/part1/unicafe/src/App.js index ec579ed..264a2cd 100644 --- a/part1/unicafe/src/App.js +++ b/part1/unicafe/src/App.js @@ -1,22 +1,40 @@ import { useState } from "react"; +const Button = (props) => { + return ; +}; +const StatisticsLine = ({ text, value }) => { + return ( +
+ {" "} + {text} {value}{" "} +
+ ); +}; const Statistics = (props) => { if (props.good + props.neutral + props.bad === 0) { returnNo feedback given
; } else { return (good {props.good}
-neutral {props.neutral}
-bad {props.bad}
-all {props.good + props.neutral + props.bad}
-- average{" "} - {(props.good - props.bad) / (props.good + props.neutral + props.bad)} -
-- positive{" "} - {(props.good / (props.good + props.neutral + props.bad)) * 100} % -
+