diff --git a/global-scoreboard/.eslintrc.json b/global-scoreboard/.eslintrc.json index fa2af6d8..e76098c1 100644 --- a/global-scoreboard/.eslintrc.json +++ b/global-scoreboard/.eslintrc.json @@ -56,6 +56,8 @@ } } ], - "sort-imports": "error" + "sort-imports": "error", + // False positives should be infered from Typescript + "react/prop-types": "off" } } diff --git a/global-scoreboard/src/Dashboard/TableElements/PlayerScoreCell.tsx b/global-scoreboard/src/Dashboard/TableElements/PlayerScoreCell.tsx index 0eb7c829..80c4b45d 100644 --- a/global-scoreboard/src/Dashboard/TableElements/PlayerScoreCell.tsx +++ b/global-scoreboard/src/Dashboard/TableElements/PlayerScoreCell.tsx @@ -1,4 +1,3 @@ - import './PlayerScoreCell.css' import React, { useState } from 'react' import { Button } from 'react-bootstrap' @@ -15,7 +14,7 @@ const PlayerScoreCell = (props: PlayerScoreCellProps) => { const handleClose = () => setShow(false) const handleShow = () => - props.player.scoreDetails == null + props.player.scoreDetails === undefined ? apiGet(`players/${props.player.userId}/score-details`) .then(res => res.text().then(scoreDetails => { @@ -25,7 +24,8 @@ const PlayerScoreCell = (props: PlayerScoreCellProps) => { ) : setShow(true) - return !props.player.scoreDetails + // Date is last known update date for a user with details + return props.player.lastUpdate < new Date('2020-05-19') ? {props.player.score} : <>