Fix incorrectly set useEffect dependency in two files

This commit is contained in:
Aurora Lahtela 2022-08-28 08:21:57 +03:00
parent 4c53a9a406
commit bfe59008d0
2 changed files with 4 additions and 4 deletions

View File

@ -32,8 +32,8 @@ const PlayerPingGraph = ({data}) => {
data: data.min_ping_series,
color: nightModeEnabled ? withReducedSaturation(data.colors.min) : data.colors.min
}
setSeries([avgPingSeries, maxPingSeries, minPingSeries, nightModeEnabled]);
}, [data, t])
setSeries([avgPingSeries, maxPingSeries, minPingSeries]);
}, [data, t, nightModeEnabled])
return (
<LineGraph id="ping-graph" series={series}/>

View File

@ -25,8 +25,8 @@ const TimeByTimeGraph = ({data}) => {
data: data.newPlayers,
color: nightModeEnabled ? withReducedSaturation(data.colors.newPlayers) : data.colors.newPlayers
};
setSeries([uniquePlayers, newPlayers, nightModeEnabled]);
}, [data, t])
setSeries([uniquePlayers, newPlayers]);
}, [data, t, nightModeEnabled])
return (
<LineGraph id="day-by-day-graph" series={series}/>