diff --git a/projects/website/src/components/leaderboard/leaderboard-scores.tsx b/projects/website/src/components/leaderboard/leaderboard-scores.tsx
index d172d15..20e5d35 100644
--- a/projects/website/src/components/leaderboard/leaderboard-scores.tsx
+++ b/projects/website/src/components/leaderboard/leaderboard-scores.tsx
@@ -25,6 +25,7 @@ type LeaderboardScoresProps = {
showDifficulties?: boolean;
isLeaderboardPage?: boolean;
leaderboardChanged?: (id: number) => void;
+ disableUrlChanging?: boolean;
};
export default function LeaderboardScores({
@@ -34,6 +35,7 @@ export default function LeaderboardScores({
showDifficulties,
isLeaderboardPage,
leaderboardChanged,
+ disableUrlChanging,
}: LeaderboardScoresProps) {
if (!initialPage) {
initialPage = 1;
@@ -115,9 +117,13 @@ export default function LeaderboardScores({
}, [currentPage, topOfScoresRef, shouldFetch]);
useEffect(() => {
+ if (disableUrlChanging) {
+ return;
+ }
+
// Update the URL
window.history.replaceState(null, "", `/leaderboard/${selectedLeaderboardId}/${currentPage}`);
- }, [selectedLeaderboardId, currentPage]);
+ }, [selectedLeaderboardId, currentPage, disableUrlChanging]);
if (currentScores === undefined) {
return undefined;
diff --git a/projects/website/src/components/score/score.tsx b/projects/website/src/components/score/score.tsx
index 53600be..ce2e0fc 100644
--- a/projects/website/src/components/score/score.tsx
+++ b/projects/website/src/components/score/score.tsx
@@ -103,7 +103,11 @@ export default function Score({ leaderboard, beatSaverMap, score, settings }: Pr
animate={{ opacity: 1, y: 0 }}
className="w-full mt-2"
>
-
+
)}