Update React, fix null dates, add default route for missing season ID and move blurred area effect to table only
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2021-02-08 03:01:53 +01:00
parent a6ca23dd5d
commit d7208b773c
11 changed files with 77 additions and 162 deletions

View File

@@ -10,14 +10,18 @@ const SeasonSwitch: React.FC<IUserListProperties> = (props: IUserListProperties)
const maxSeasonId = Number(props.userStats.maxSeasonId)
return (
<div className={"SeasonSwitch " + (!props.enabled && " no-click")} data-testid="SeasonSwitch">
<div className={"SeasonSwitch"} data-testid="SeasonSwitch">
{
seasonId > 1
&& (props.enabled
? <Link to={"/season/" + (seasonId - 1)} onClick={() => props.onSeasonIdChange('' + (seasonId - 1))}>
&& <Link to={"/season/" + (seasonId - 1)} onClick={() => {
console.log("nothing happens")
props.onSeasonIdChange('' + (seasonId - 1))}}>
<FontAwesomeIcon icon="arrow-circle-left"/>
</Link>
: <Link to={""} onClick={(e) => e.preventDefault()}>
|| <Link to={""} onClick={(e) => {
console.log("nothing happens2")
e.preventDefault()}}>
<FontAwesomeIcon icon="arrow-circle-left"/>
</Link>)
}