Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[토너먼트] 강제종료 #508

Merged
merged 3 commits into from
Mar 17, 2024
Merged

Conversation

imeureka
Copy link
Member

이슈 넘버

구현 사항

  • 토너먼트 강제 종료 버튼

Need Review

  • object%20Object이슈 해결했습니다.onclick 에 룸아이디를 프롭으로 전달안해서 생긴 문제였어요 ㅎㅎ

📸 스크린샷

Reference

@imeureka imeureka self-assigned this Mar 16, 2024
Copy link

PR Preview Action v1.4.6
🚀 Deployed preview to https://SWEET-DEVELOPERS.github.io/sweet-client/pr-preview/pr-508/
on branch gh-pages at 2024-03-16 03:21 UTC

@@ -15,12 +15,12 @@ const TournamentDeleteButton = ({ onClick }: TournamentStartButtonProps) => {
backgroundColor: '#FF2176',
border: 'none',
}}
onClick={onClick}
onClick={() => onClick(roomId)} // props로 받은 roomId를 사용
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아 ㅋㅋㅋㅋ 이 부분이 문제였군요

Comment on lines +6 to +8
export async function deleteRoom(roomId: number) {
await post(`/gift/tournament-end/${roomId}`);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오 delete는 한 번도 안해봤는데 post만 보내도 되는군요! 하나 또 배워갑니다 ㅎㅎ

export const useDeleteRoom = ({ roomId }: { roomId: number }) => {
const queryClient = useQueryClient();

const mutation: any = useMutation({
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

혹시 mutation을 {mutation}으로 받아도 타입 설정을 해줘야할까요??

Copy link
Member

@ExceptAnyone ExceptAnyone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

되게 고통받으셨는데 결국 해결하셨군요!! 고생많으셨습니다. mutation 부분에 리뷰하나 남겼으니 확인 부탁드릴게요. 항상 감사합니다 ㅎㅎ

@imeureka imeureka merged commit d25d356 into develop Mar 17, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants