Remove all linter reported errors
Signed-off-by: James Ketrenos <james_eikona@ketrenos.com>
This commit is contained in:
parent
a31741f069
commit
395f31aae3
@ -84,7 +84,7 @@ const Chat = ({ table }) => {
|
||||
let lines = item.message.split('.');
|
||||
const message = lines.map((line, index) => {
|
||||
if (line.trim() === '') {
|
||||
return;
|
||||
return <></>;
|
||||
}
|
||||
/* If the date is in the future, set it to now */
|
||||
const dice = line.match(/^(.*rolled )([1-6])(, ([1-6]))?(.*)$/);
|
||||
|
@ -25,7 +25,7 @@ const ChooseCard = ({table, type}) => {
|
||||
tmp.push(selected[i].getAttribute('data-type'));
|
||||
}
|
||||
setCards(tmp);
|
||||
}, [ setCards ]);
|
||||
}, [ setCards, count ]);
|
||||
|
||||
if (!table.game) {
|
||||
return <></>;
|
||||
@ -55,6 +55,9 @@ const ChooseCard = ({table, type}) => {
|
||||
case 'year-of-plenty':
|
||||
title = <><b>Year of Plenty</b>! Tap the two resources you want to receive from the bank!</>;
|
||||
break;
|
||||
default:
|
||||
title = <>Unknown card type {type}.</>;
|
||||
break;
|
||||
}
|
||||
|
||||
return (
|
||||
|
@ -87,7 +87,6 @@ const PlayersStatus = ({ table, onClick, color, active }) => {
|
||||
const game = table.game;
|
||||
let players;
|
||||
if (color) {
|
||||
const player = game.players[color];
|
||||
players = <Player
|
||||
onClick={onClick}
|
||||
reverse
|
||||
@ -99,7 +98,6 @@ const PlayersStatus = ({ table, onClick, color, active }) => {
|
||||
.filter(color => game.players[color].status === 'Active'
|
||||
&& game.color !== color)
|
||||
.map(color => {
|
||||
const player = game.players[color];
|
||||
return <Player
|
||||
onClick={onClick}
|
||||
key={`PlayerStatus-${getPlayerName(game.sessions, color)}`}
|
||||
|
@ -5,8 +5,6 @@ import Paper from '@material-ui/core/Paper';
|
||||
import Button from '@material-ui/core/Button';
|
||||
import TextField from '@material-ui/core/TextField';
|
||||
import List from '@material-ui/core/List';
|
||||
import ListItemText from '@material-ui/core/ListItemText';
|
||||
import Moment from 'react-moment';
|
||||
import Board from './Board.js';
|
||||
import Trade from './Trade.js';
|
||||
import { assetsPath, base, getPlayerName, gamesPath } from './Common.js';
|
||||
@ -193,11 +191,11 @@ const Action = ({ table }) => {
|
||||
const passClick = (event) => {
|
||||
return table.passTurn();
|
||||
}
|
||||
|
||||
/*
|
||||
const quitClick = (event) => {
|
||||
table.setSelected("");
|
||||
}
|
||||
|
||||
*/
|
||||
if (!table.game) {
|
||||
console.log("Why no game?");
|
||||
return (<Paper className="Action"/>);
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { useState, useCallback } from "react";
|
||||
import React from "react";
|
||||
import "./ViewCard.css";
|
||||
import Paper from '@material-ui/core/Paper';
|
||||
import Button from '@material-ui/core/Button';
|
||||
@ -28,7 +28,7 @@ const ViewCard = ({table, card}) => {
|
||||
};
|
||||
|
||||
let description, lookup;
|
||||
if (card.type == 'progress') {
|
||||
if (card.type === 'progress') {
|
||||
lookup = `${card.type}-${card.card}`;
|
||||
} else {
|
||||
lookup = card.type;
|
||||
@ -71,12 +71,11 @@ const ViewCard = ({table, card}) => {
|
||||
<b>2</b> of the same resource or <b>1</b> of two differ resources.</div>
|
||||
</>;
|
||||
break;
|
||||
default:
|
||||
description = <>Unknown card type {lookup}</>;
|
||||
break;
|
||||
};
|
||||
|
||||
if (description === undefined) {
|
||||
console.log(`No description for ${card.type}-${card.card}`);
|
||||
}
|
||||
|
||||
let canPlay = false;
|
||||
if (card.type === 'vp') {
|
||||
let points = table.game.player.points;
|
||||
|
Loading…
x
Reference in New Issue
Block a user