added skip timeout

This commit is contained in:
Wenszel
2022-06-08 22:13:18 +02:00
parent f0d6fa758d
commit 4e52512c7d
3 changed files with 2 additions and 12 deletions
-8
View File
@@ -2,7 +2,6 @@ import React, { useState, useEffect, useContext, useCallback } from 'react';
import ReactLoading from 'react-loading';
import { PlayerDataContext, SocketContext } from '../App';
import Map from './game-board-components/Map';
import Dice from './game-board-components/Dice';
import Navbar from './Navbar';
const Gameboard = () => {
@@ -96,10 +95,3 @@ const Gameboard = () => {
};
export default Gameboard;
/*
<Dice
rolledNumber={rolledNumber}
nowMoving={nowMoving}
color={movingPlayer}
rolledNumberCallback={rolledNumberCallback}
/>*/
@@ -26,10 +26,6 @@ const NameContainer = ({ player, time }) => {
// Function responsible for counting down to the end of time every second
const countdown = () => {
// If the time if over emit information to server
if (remainingTime <= 0) {
return socket.emit('game:skip');
}
setRemainingTime(Math.ceil((time - Date.now()) / 1000));
};