mirror of
https://github.com/10h30/fullstackopen.git
synced 2026-06-05 15:08:33 +09:00
Completed 1.11 (unicafe step 6)
This commit is contained in:
@@ -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 (
|
||||||
|
|||||||
Reference in New Issue
Block a user