Skip to content

Commit

Permalink
fix: 참여가 여러번 되는 문제 해결
Browse files Browse the repository at this point in the history
  • Loading branch information
pp449 committed Dec 10, 2024
1 parent 2e908a7 commit 4d0bd64
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ const RoomCardModalButton = ({ roomInfo }: RoomCardModalButtonProps) => {
};

const handleParticipateRoomClick = () => {
if (postParticipateInMutation.isPending) return;

postParticipateInMutation.mutate(
{
roomId: roomInfo.id,
Expand Down Expand Up @@ -130,6 +132,7 @@ const RoomCardModalButton = ({ roomInfo }: RoomCardModalButtonProps) => {
<Button
variant="primary"
size="small"
disabled={postParticipateInMutation.isPending}
onClick={roomInfo.isPublic ? handleParticipateRoomClick : handleNoticeModal}
>
참여하기
Expand Down

0 comments on commit 4d0bd64

Please sign in to comment.