This commit is contained in:
parent
75c223375f
commit
f418ac9388
@ -34,7 +34,7 @@ export default function SearchPlayer() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Search by name
|
// Search by name
|
||||||
const players = await searchByName(encodeURIComponent(search));
|
const players = await searchByName(search);
|
||||||
if (players == undefined) return;
|
if (players == undefined) return;
|
||||||
|
|
||||||
setPlayers(players);
|
setPlayers(players);
|
||||||
|
@ -29,7 +29,7 @@ export async function searchByName(
|
|||||||
name: string,
|
name: string,
|
||||||
): Promise<ScoresaberPlayer[] | undefined> {
|
): Promise<ScoresaberPlayer[] | undefined> {
|
||||||
const response = await fetchQueue.fetch(
|
const response = await fetchQueue.fetch(
|
||||||
formatString(SEARCH_PLAYER_URL, name),
|
encodeURIComponent(formatString(SEARCH_PLAYER_URL, name)),
|
||||||
);
|
);
|
||||||
const json = await response.json();
|
const json = await response.json();
|
||||||
|
|
||||||
@ -95,7 +95,9 @@ export async function fetchScores(
|
|||||||
limit = 100;
|
limit = 100;
|
||||||
}
|
}
|
||||||
const response = await fetchQueue.fetch(
|
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();
|
const json = await response.json();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user