Skip to content

Commit

Permalink
[fix] escape함수를 통한 문자열 치환 #1179 (#1180)
Browse files Browse the repository at this point in the history
* [fix] escape함수를 통한 문자열 치환 #1179

* [Fix] TBD => '' 공백으로 변환 #1179

---------

Co-authored-by: Junho jeon <[email protected]>
  • Loading branch information
joonho0410 and Junho jeon authored Dec 21, 2023
1 parent 0ef00ce commit f306480
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion components/tournament/TournamentBraket.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export default function TournamentBraket({
<SingleEliminationBracket
matches={singleEliminationBracketMatchs}
onPartyClick={(party: Participant, won: boolean) => {
if (party.name !== 'TBD') setHighLightUser(party.name);
if (party.name !== '') setHighLightUser(party.name);
}}
matchComponent={TournamentMatch}
options={{
Expand Down
2 changes: 1 addition & 1 deletion components/tournament/TournamentMatch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function TournamentMatchParty({
return (
<div
className={`${styles.tournamentPartyWrapper} ${
highLightUser !== 'TBD' && highLightUser === party.name
highLightUser !== '' && highLightUser === party.name
? styles.highlight
: ''
}`}
Expand Down
3 changes: 2 additions & 1 deletion hooks/admin/modal/useAdminSearchUser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ export default function useAdminSearchUser() {

const fetchUserIntraId = useCallback(async () => {
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);
Expand Down
4 changes: 2 additions & 2 deletions hooks/tournament/useTournamentMatchEditor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import { useState } from 'react';
import { instance, instanceInManage } from 'utils/axios';

const emptyParty: Participant = {
id: 'TBD',
name: 'TBD',
id: '',
name: '',
resultText: '',
};

Expand Down

0 comments on commit f306480

Please sign in to comment.