Skip to content

Commit

Permalink
[Fix] 변수명 수정 #1205 (#1206)
Browse files Browse the repository at this point in the history
Co-authored-by: Junho jeon <[email protected]>
  • Loading branch information
joonho0410 and Junho jeon authored Dec 22, 2023
1 parent 56d666c commit f13342b
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 24 deletions.
11 changes: 0 additions & 11 deletions components/admin/tournament/TournamentEditMatch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,18 +142,7 @@ function TournamentMatchEditor({

export default function TournamentEditMatch({
match,
onMatchClick,
onPartyClick,
onMouseEnter,
onMouseLeave,
topWon,
bottomWon,
topHovered,
bottomHovered,
topText,
bottomText,
connectorColor,
computedStyles,
teamNameFallback,
resultFallback,
}: MatchComponentProps) {
Expand Down
8 changes: 4 additions & 4 deletions components/modal/tournament/TournamentRegistryModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default function TournamentRegistryModal({
status,
type,
endTime,
player_cnt,
playerCnt,
tournamentId,
}: TournamentInfo) {
const setSnackbar = useSetRecoilState(toastState);
Expand All @@ -38,7 +38,7 @@ export default function TournamentRegistryModal({
const [openDate, setOpenDate] = useState<string>('미정');
const [closeDate, setCloseDate] = useState<string>('미정');
const [loading, setLoading] = useState<boolean>(false);
const [playerCount, setPlayerCount] = useState<number>(player_cnt);
const [playerCount, setPlayerCount] = useState<number>(playerCnt);
const registTournament = useCallback(() => {
setLoading(true);
return instance
Expand Down Expand Up @@ -120,8 +120,8 @@ export default function TournamentRegistryModal({
return instance
.get(`/pingpong/tournaments/${tournamentId}`)
.then((res) => {
setPlayerCount(res.data.player_cnt);
return res.data.player_cnt;
setPlayerCount(res.data.playerCnt);
return res.data.playerCnt;
})
.catch((error) => {
setError('JJH2');
Expand Down
10 changes: 5 additions & 5 deletions components/tournament/TournamentCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ export default function TournamentCard({
endTime,
winnerIntraId,
winnerImageUrl,
player_cnt,
playerCnt,
page,
}: TournamentInfo & { page: string }) {
const modal = useRecoilValue(modalState);
const setModal = useSetRecoilState<Modal>(modalState);
const [registState, setRegistState] = useState<string>('로딩중');
const [playerCount, setPlayerCount] = useState<number>(player_cnt);
const [playerCount, setPlayerCount] = useState<number>(playerCnt);
const setError = useSetRecoilState(errorState);

const openTournamentInfoModal = () => {
Expand All @@ -42,7 +42,7 @@ export default function TournamentCard({
endTime: endTime,
winnerIntraId: winnerIntraId,
winnerImageUrl: winnerImageUrl,
player_cnt: playerCount,
playerCnt: playerCount,
},
});
};
Expand All @@ -51,8 +51,8 @@ export default function TournamentCard({
return instance
.get(`/pingpong/tournaments/${tournamentId}`)
.then((res) => {
setPlayerCount(res.data.player_cnt);
return res.data.player_cnt;
setPlayerCount(res.data.playerCnt);
return res.data.playerCnt;
})
.catch((error) => {
setError('JJH2');
Expand Down
4 changes: 2 additions & 2 deletions pages/api/pingpong/tournaments/dummyTournamentData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ for (let i = 28; i >= 1; i--) {
type: 'ROOKIE',
winnerIntraId: users[i % 3].intraId,
winnerImageUrl: users[i % 3].imageUrl,
player_cnt: 8,
playerCnt: 8,
};

const masterTournament: TournamentInfo = {
Expand All @@ -57,7 +57,7 @@ for (let i = 28; i >= 1; i--) {
type: 'MASTER',
winnerIntraId: users[i % 3].intraId,
winnerImageUrl: users[i % 3].imageUrl,
player_cnt: 7,
playerCnt: 7,
};

dummyTournaments.push(masterTournament, rookieTournament);
Expand Down
2 changes: 1 addition & 1 deletion types/admin/adminTournamentTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export interface ITournament {
winnerImageUrl: string;
startTime: Date;
endTime: Date;
player_cnt: number;
playerCnt: number;
}

export interface ITournamentTable {
Expand Down
2 changes: 1 addition & 1 deletion types/tournamentTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export interface TournamentInfo {
winnerImageUrl: string;
startTime: string;
endTime: string;
player_cnt: number;
playerCnt: number;
}

export interface TournamentData {
Expand Down

0 comments on commit f13342b

Please sign in to comment.