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