1
0
Fork 0

Filter stats where value = 0

main
Kevin Belisle 2021-07-21 15:53:40 -04:00
parent f1afe82492
commit 2ba00ab2c6
2 changed files with 2 additions and 2 deletions

View File

@ -21,7 +21,7 @@ const Player = ({ playerId, players }) => {
async () => {
const { data } = await axios.get(`/api/players/${playerId}`);
data.sort((a, b) => a.rank - b.rank);
return data;
return data.filter((x) => x.value > 0);
},
{
placeholderData: [],

View File

@ -19,7 +19,7 @@ const Statistic = ({ type, name, players }) => {
`statistic ${type} ${name}`,
async () => {
const { data } = await axios.get(`/api/statistics/${type}/${name}`);
return data;
return data.filter((x) => x.value > 0);
},
{
placeholderData: [],