change win text

This commit is contained in:
Mashy 2019-10-22 14:24:30 +10:00
parent 21d55e27b0
commit 4edeb6d315

View File

@ -97,20 +97,13 @@ function Faceoff(props) {
</div>
);
}
if (instance.winner === playerTeam.id) {
const winner = instance.winner === playerTeam.id ? playerTeam.name : otherTeam.name;
return (
<div class="faceoff-text">
<h1> You are the champion </h1>
<h1> {winner} wins</h1>
</div>
)
}
return (
<div class="faceoff-text">
<h1> You lose </h1>
</div>
)
}
return (