From f306480f8c61a116899c24cf7d118d3890093f35 Mon Sep 17 00:00:00 2001 From: joonho0410 <76806109+joonho0410@users.noreply.github.com> Date: Thu, 21 Dec 2023 15:25:31 +0900 Subject: [PATCH] =?UTF-8?q?[fix]=20escape=ED=95=A8=EC=88=98=EB=A5=BC=20?= =?UTF-8?q?=ED=86=B5=ED=95=9C=20=EB=AC=B8=EC=9E=90=EC=97=B4=20=EC=B9=98?= =?UTF-8?q?=ED=99=98=20#1179=20(#1180)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [fix] escape함수를 통한 문자열 치환 #1179 * [Fix] TBD => '' 공백으로 변환 #1179 --------- Co-authored-by: Junho jeon --- components/tournament/TournamentBraket.tsx | 2 +- components/tournament/TournamentMatch.tsx | 2 +- hooks/admin/modal/useAdminSearchUser.ts | 3 ++- hooks/tournament/useTournamentMatchEditor.ts | 4 ++-- 4 files changed, 6 insertions(+), 5 deletions(-) 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: '', };