Completed 1.11 (unicafe step 6)

This commit is contained in:
2021-08-26 20:39:41 +07:00
parent a80cf4877b
commit 5aaa738334
+5 -4
View File
@@ -18,22 +18,23 @@ const App = () => {
<div> <div>
<h1>Statistic</h1> <h1>Statistic</h1>
{all > 0 && {all > 0 &&
<div> <table>
<tbody>
<StatisticLine text="Good" value ={good} /> <StatisticLine text="Good" value ={good} />
<StatisticLine text="Neutral" value ={neutral} /> <StatisticLine text="Neutral" value ={neutral} />
<StatisticLine text="Bad" value ={bad} /> <StatisticLine text="Bad" value ={bad} />
<StatisticLine text="All" value ={all} /> <StatisticLine text="All" value ={all} />
<StatisticLine text="Average" value ={avg} /> <StatisticLine text="Average" value ={avg} />
<StatisticLine text="Positive" value ={positive} /> <StatisticLine text="Positive" value ={positive} />
</tbody>
</div> </table>
} }
{all === 0 && "No feedback given"} {all === 0 && "No feedback given"}
</div> </div>
) )
} }
const StatisticLine = (props) => <p>{props.text}: {props.value}</p> const StatisticLine = (props) => <tr><td>{props.text}</td><td>{props.value}</td></tr>
const Button = (props) => { const Button = (props) => {
return ( return (