From 4acc4c44064dbe1b368eab328a97cfd184f5e35d Mon Sep 17 00:00:00 2001 From: Liam Date: Sat, 28 Sep 2024 14:44:32 +0100 Subject: [PATCH] fix eslint --- src/app/(pages)/api/player/isbeingtracked/route.ts | 4 +--- src/components/player/player-scores.tsx | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) 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 });