diff --git a/components/tournament/TournamentBraket.tsx b/components/tournament/TournamentBraket.tsx index 2fe05ca7b..b979dac2e 100644 --- a/components/tournament/TournamentBraket.tsx +++ b/components/tournament/TournamentBraket.tsx @@ -56,7 +56,7 @@ export default function TournamentBraket({ { - if (party.name !== 'TBD') setHighLightUser(party.name); + if (party.name !== '') setHighLightUser(party.name); }} matchComponent={TournamentMatch} options={{ diff --git a/components/tournament/TournamentMatch.tsx b/components/tournament/TournamentMatch.tsx index b061f74dd..98d579b5f 100644 --- a/components/tournament/TournamentMatch.tsx +++ b/components/tournament/TournamentMatch.tsx @@ -26,7 +26,7 @@ function TournamentMatchParty({ return (
{ try { + const safeInput = escape(inputId); const res = await instance.get( - `/pingpong/users/searches?intraId=${inputId}` + `/pingpong/users/searches?intraId=${safeInput}` ); const users = res.data.users; setUserList(users); diff --git a/hooks/tournament/useTournamentMatchEditor.ts b/hooks/tournament/useTournamentMatchEditor.ts index be6fd5d09..35d5fc4a3 100644 --- a/hooks/tournament/useTournamentMatchEditor.ts +++ b/hooks/tournament/useTournamentMatchEditor.ts @@ -6,8 +6,8 @@ import { useState } from 'react'; import { instance, instanceInManage } from 'utils/axios'; const emptyParty: Participant = { - id: 'TBD', - name: 'TBD', + id: '', + name: '', resultText: '', };