diff --git a/src/pages/GatheringDetail/hooks/useGatheringEntrance.ts b/src/pages/GatheringDetail/hooks/useGatheringEntrance.ts index 78c83568..7f5c21ac 100644 --- a/src/pages/GatheringDetail/hooks/useGatheringEntrance.ts +++ b/src/pages/GatheringDetail/hooks/useGatheringEntrance.ts @@ -5,7 +5,9 @@ import { showErrorToast } from '@/utils/showToast'; export const useGatheringEntrance = (roomId: string) => { const postGatheringEntranceApi = usePostGatheringEntranceApi(); - const { sendMessage } = useSendChatMessage(parseInt(roomId, 10)); + const { sendMessage } = useSendChatMessage({ + gatheringId: parseInt(roomId, 10), + }); return async (onOpenModal: () => void) => { const { data, isOk, isBadRequest } = await postGatheringEntranceApi(roomId); diff --git a/src/pages/GatheringDetail/hooks/useGatheringLeave.ts b/src/pages/GatheringDetail/hooks/useGatheringLeave.ts index d200e770..4dd628d1 100644 --- a/src/pages/GatheringDetail/hooks/useGatheringLeave.ts +++ b/src/pages/GatheringDetail/hooks/useGatheringLeave.ts @@ -5,7 +5,9 @@ import { showErrorToast } from '@/utils/showToast'; export const useGatheringLeave = (roomId: string) => { const postGatheringLeaveApi = usePostGatheringLeaveApi(); - const { sendMessage } = useSendChatMessage(parseInt(roomId, 10)); + const { sendMessage } = useSendChatMessage({ + gatheringId: parseInt(roomId, 10), + }); return async (onOpenModal: () => void) => { const { data, isOk, isBadRequest } = await postGatheringLeaveApi(roomId); diff --git a/src/pages/GatheringDetail/hooks/useKickParticipant.ts b/src/pages/GatheringDetail/hooks/useKickParticipant.ts index eb45dac1..c9bbd9ab 100644 --- a/src/pages/GatheringDetail/hooks/useKickParticipant.ts +++ b/src/pages/GatheringDetail/hooks/useKickParticipant.ts @@ -5,7 +5,9 @@ import { showErrorToast } from '@/utils/showToast'; export const useKickParticipant = (gatheringId: number) => { const postKickParticipantApi = useKickParticipantApi(gatheringId); - const { sendMessage } = useSendChatMessage(gatheringId); + const { sendMessage } = useSendChatMessage({ + gatheringId, + }); return async (userId: number, onOpenModal: () => void) => { const { data, isOk, isBadRequest } = await postKickParticipantApi(userId); diff --git a/src/pages/GatheringFix/GatheringFixForm/useGatheringFix.ts b/src/pages/GatheringFix/GatheringFixForm/useGatheringFix.ts index c6c762b1..b2dccaf8 100644 --- a/src/pages/GatheringFix/GatheringFixForm/useGatheringFix.ts +++ b/src/pages/GatheringFix/GatheringFixForm/useGatheringFix.ts @@ -11,7 +11,9 @@ type OnGatheringFix = () => void; const useCreateGathering = (onCreate: OnGatheringFix, gatheringId: string) => { const gatheringCreateApi = usePostGatheringFix(); - const { sendMessage } = useSendChatMessage(parseInt(gatheringId, 10)); + const { sendMessage } = useSendChatMessage({ + gatheringId: parseInt(gatheringId, 10), + }); return async (request: GatheringFixRequest) => { const { data, isBadRequest } = await gatheringCreateApi({ diff --git a/src/pages/GatheringUnfix/hooks/useGatheringUnfix.ts b/src/pages/GatheringUnfix/hooks/useGatheringUnfix.ts index adfe03da..5ed3dfbb 100644 --- a/src/pages/GatheringUnfix/hooks/useGatheringUnfix.ts +++ b/src/pages/GatheringUnfix/hooks/useGatheringUnfix.ts @@ -7,7 +7,9 @@ import type { OnGatheringUnfix } from '../components/GatheringUnfixForm'; const useGatheringUnfix = (onUnfix: OnGatheringUnfix, gatheringId: string) => { const gatheringUnfixApi = useDeleteGatheringUnfixApi(gatheringId); - const { sendMessage } = useSendChatMessage(parseInt(gatheringId, 10)); + const { sendMessage } = useSendChatMessage({ + gatheringId: parseInt(gatheringId, 10), + }); return async (reason: string) => { const { data, isBadRequest } = await gatheringUnfixApi({