-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f2e3d98
commit 5ba1f7e
Showing
3 changed files
with
38 additions
and
3 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
packages/web-domains/src/about-me/common/apis/mutates/useCreateHandWavings.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { useMutation } from '@tanstack/react-query'; | ||
|
||
import { Http } from '@/common/apis/base.api'; | ||
|
||
interface Request { | ||
meetingId: number; | ||
receiverMemberId: number; | ||
} | ||
|
||
export const useCreateHandWavings = () => { | ||
return useMutation({ | ||
mutationFn: ({ meetingId, receiverMemberId }: Request) => | ||
Http.POST(`/v1/meetings/${meetingId}/hand-wavings`, { receiverMemberId }), | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
packages/web-domains/src/about-me/features/hooks/useGetFirstMeetingId.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { useGetMeetings } from '@/about-me/common/apis/queries/useGetMeetings'; | ||
|
||
export const useGetFirstMeetingId = () => { | ||
const { data } = useGetMeetings(); | ||
// NOTE: 하나의 모임에 참여할 수 있는 현재 스펙에서 첫 번째 meetingId를 가져옴 | ||
const meetingId = data?.meetings[0]?.meetingId || -1; | ||
|
||
return { meetingId }; | ||
}; |