+ style={{backgroundImage:`url(${assetsPath}/gfx/placard-${this.props.type}.png)`}}>
);
}
};
class Development extends React.Component {
- constructor(props) {
- super(props);
- }
render() {
const array = [];
for (let i = 0; i < this.props.count; i++) {
@@ -178,7 +200,7 @@ class Development extends React.Component {
{ React.Children.map(array, i => (
+ style={{backgroundImage:`url(${assetsPath}/gfx/card-${this.props.type}${i}.png)`}}>
)) }
@@ -187,9 +209,6 @@ class Development extends React.Component {
};
class Resource extends React.Component {
- constructor(props) {
- super(props);
- }
render() {
const array = new Array(Number(this.props.count ? this.props.count : 0));
return (
@@ -198,7 +217,7 @@ class Resource extends React.Component {
{ React.Children.map(array, i => (
+ style={{backgroundImage:`url(${assetsPath}/gfx/card-${this.props.type}.png)`}}>
)) }
@@ -213,7 +232,7 @@ const Chat = ({ game, promoteGameState }) => {
};
const chatKeyPress = (event) => {
- if (event.key == "Enter") {
+ if (event.key === "Enter") {
console.log(`Send: ${event.target.value}`);
promoteGameState({
chat: {
@@ -232,10 +251,10 @@ const Chat = ({ game, promoteGameState }) => {
chatList.scrollTop = chatList.scrollHeight - chatList.offsetHeight;
})
- const timeDelta = game.timestamp - Date.now();
+ //const timeDelta = game.timestamp - Date.now();
const messages = game.chat.map((item, index) => {
- const timestamp = moment(item.date - timeDelta).fromNow();
+ //const timestamp = moment(item.date - timeDelta).fromNow();
return (