Filter stats where value = 0
parent
f1afe82492
commit
2ba00ab2c6
|
@ -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: [],
|
||||
|
|
|
@ -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: [],
|
||||
|
|
Loading…
Reference in New Issue