better fix for below
All checks were successful
deploy / deploy (push) Successful in 1m8s

This commit is contained in:
Lee 2023-10-20 22:00:19 +01:00
parent 75c223375f
commit f418ac9388
2 changed files with 5 additions and 3 deletions

@ -34,7 +34,7 @@ export default function SearchPlayer() {
}
// Search by name
const players = await searchByName(encodeURIComponent(search));
const players = await searchByName(search);
if (players == undefined) return;
setPlayers(players);

@ -29,7 +29,7 @@ export async function searchByName(
name: string,
): Promise<ScoresaberPlayer[] | undefined> {
const response = await fetchQueue.fetch(
formatString(SEARCH_PLAYER_URL, name),
encodeURIComponent(formatString(SEARCH_PLAYER_URL, name)),
);
const json = await response.json();
@ -95,7 +95,9 @@ export async function fetchScores(
limit = 100;
}
const response = await fetchQueue.fetch(
formatString(PLAYER_SCORES, playerId, limit, searchType, page),
encodeURIComponent(
formatString(PLAYER_SCORES, playerId, limit, searchType, page),
),
);
const json = await response.json();