From ba506a59db216fd96c87abaa4405a10aa8cefecd Mon Sep 17 00:00:00 2001 From: Liam Date: Wed, 2 Oct 2024 10:56:28 +0100 Subject: [PATCH] please build i am begging you --- src/components/player/player-scores.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/player/player-scores.tsx b/src/components/player/player-scores.tsx index 9895fd9..b010d64 100644 --- a/src/components/player/player-scores.tsx +++ b/src/components/player/player-scores.tsx @@ -130,7 +130,7 @@ export default function PlayerScores({ initialScoreData, initialSearch, player, (page: number) => { return `/player/${player.id}/${pageState.sort}/${page}${isSearchActive ? `?search=${debouncedSearchTerm}` : ""}`; }, - [debouncedSearchTerm, player.id, pageState.sort] + [debouncedSearchTerm, player.id, pageState.sort, isSearchActive] ); /** @@ -140,7 +140,7 @@ export default function PlayerScores({ initialScoreData, initialSearch, player, useEffect(() => { const newUrl = getUrl(pageState.page); window.history.replaceState({ ...window.history.state, as: newUrl, url: newUrl }, "", newUrl); - }, [pageState, debouncedSearchTerm, player.id, isSearchActive]); + }, [pageState, debouncedSearchTerm, player.id, isSearchActive, getUrl]); /**k * Handle scrolling to the top of the