diff --git a/part1/1.12-1.14-anecdotes/src/App.js b/part1/1.12-1.14-anecdotes/src/App.js index db6b4ad..2e0a131 100644 --- a/part1/1.12-1.14-anecdotes/src/App.js +++ b/part1/1.12-1.14-anecdotes/src/App.js @@ -30,15 +30,16 @@ const App = () => { setPoints(newpoints) } - const Best = (props) => { + const BestNote = (props) => { const best = props.data const mostvote = Math.max(...best) const index = best.indexOf(mostvote); + return (
{props.notes[index]}
- has {mostvote} votes + {mostvote >0 &&{props.notes[index]}
+ has {mostvote} votes