diff --git a/src/app/(pages)/api/player/isbeingtracked/route.ts b/src/app/(pages)/api/player/isbeingtracked/route.ts index 4aaefeb..e85c668 100644 --- a/src/app/(pages)/api/player/isbeingtracked/route.ts +++ b/src/app/(pages)/api/player/isbeingtracked/route.ts @@ -12,9 +12,7 @@ export async function GET(request: NextRequest) { } await connectMongo(); // Connect to Mongo - // Fetch the player and return their statistic history - let foundPlayer: IPlayer | null = await PlayerModel.findById(id); - + const foundPlayer: IPlayer | null = await PlayerModel.findById(id); const response: { tracked: boolean; lastTracked?: string } = { tracked: foundPlayer != null, }; diff --git a/src/components/player/player-scores.tsx b/src/components/player/player-scores.tsx index 6bc4eb4..6a0d136 100644 --- a/src/components/player/player-scores.tsx +++ b/src/components/player/player-scores.tsx @@ -129,7 +129,7 @@ export default function PlayerScores({ "", newUrl, ); - }, [pageState, debouncedSearchTerm, player.id]); + }, [pageState, debouncedSearchTerm, player.id, isSearchActive]); const handleSearchChange = (query: string) => { setSearchState({ query });