phase end

This commit is contained in:
ntr
2019-05-01 13:03:26 +10:00
parent 2dfdd0d09c
commit 7319b4b2ba
5 changed files with 74 additions and 14 deletions
+13
View File
@@ -78,6 +78,18 @@ function GamePanel(props) {
</div>
);
const timerPct = (Date.parse(game.phase_start) + 1000 * 60 * 60) - Date.now();
console.log(Date.now(), Date.parse(game.phase_start));
console.log(timerPct);
const timer = (
<progress value="100">
<div className="progress-container">
<span className="progress-bar"></span>
</div>
</progress>
);
function findCryp(id) {
const team = game.players.find(t => t.cryps.find(c => c.id === id));
if (team) return team.cryps.find(c => c.id === id);
@@ -173,6 +185,7 @@ function GamePanel(props) {
return (
<main className="game" onClick={() => setActiveCryp(null)} >
{header}
{timer}
{PlayerTeam(playerTeam, setActiveSkill)}
<div className="mobile-skills">
{mobileSkills}