This commit is contained in:
parent
53b51582b2
commit
4acc4c4406
@ -12,9 +12,7 @@ export async function GET(request: NextRequest) {
|
|||||||
}
|
}
|
||||||
await connectMongo(); // Connect to Mongo
|
await connectMongo(); // Connect to Mongo
|
||||||
|
|
||||||
// Fetch the player and return their statistic history
|
const foundPlayer: IPlayer | null = await PlayerModel.findById(id);
|
||||||
let foundPlayer: IPlayer | null = await PlayerModel.findById(id);
|
|
||||||
|
|
||||||
const response: { tracked: boolean; lastTracked?: string } = {
|
const response: { tracked: boolean; lastTracked?: string } = {
|
||||||
tracked: foundPlayer != null,
|
tracked: foundPlayer != null,
|
||||||
};
|
};
|
||||||
|
@ -129,7 +129,7 @@ export default function PlayerScores({
|
|||||||
"",
|
"",
|
||||||
newUrl,
|
newUrl,
|
||||||
);
|
);
|
||||||
}, [pageState, debouncedSearchTerm, player.id]);
|
}, [pageState, debouncedSearchTerm, player.id, isSearchActive]);
|
||||||
|
|
||||||
const handleSearchChange = (query: string) => {
|
const handleSearchChange = (query: string) => {
|
||||||
setSearchState({ query });
|
setSearchState({ query });
|
||||||
|
Reference in New Issue
Block a user