This commit is contained in:
parent
7112d3f53b
commit
dd3b7256b0
@ -139,7 +139,7 @@ export default function PlayerScores({
|
|||||||
if (scores) {
|
if (scores) {
|
||||||
handleScoreLoad();
|
handleScoreLoad();
|
||||||
}
|
}
|
||||||
}, [scores, isError]);
|
}, [scores, isError, handleScoreLoad]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const newUrl = `/player/${player.id}/${pageState.sort}/${pageState.page}`;
|
const newUrl = `/player/${player.id}/${pageState.sort}/${pageState.page}`;
|
||||||
|
@ -90,7 +90,7 @@ export default function ScoreStats({ score, leaderboard }: Props) {
|
|||||||
<div className={`grid grid-cols-3 grid-rows-2 gap-1 ml-0 lg:ml-2`}>
|
<div className={`grid grid-cols-3 grid-rows-2 gap-1 ml-0 lg:ml-2`}>
|
||||||
{badges.map((badge, index) => {
|
{badges.map((badge, index) => {
|
||||||
const toRender = badge.create(score, leaderboard);
|
const toRender = badge.create(score, leaderboard);
|
||||||
let color = badge.color?.(score, leaderboard);
|
const color = badge.color?.(score, leaderboard);
|
||||||
if (toRender === undefined) {
|
if (toRender === undefined) {
|
||||||
return <div key={index} />;
|
return <div key={index} />;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user