Skip to content

Commit

Permalink
안부전화 api 코드 구현 (코드리뷰 수정 반영) (#76)
Browse files Browse the repository at this point in the history
안부전화 api 코드 구현 (코드리뷰 수정 반영)
  • Loading branch information
Dobbymin authored Oct 15, 2024
2 parents ce46879 + d8575e0 commit 10c86cd
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ export const usePostApplyHelloCall = (): UseMutationResult<
mutationFn: (data: ApplyHelloCallRequest) => postApplyHelloCall(data),
onSuccess: () => {
alert('안부전화 서비스가 신청되었습니다.');
window.location.reload();
},
onError: (error) => {
console.error('안부전화 서비스 신청에 실패했습니다.', error);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ export const usePostCostHelloCall = (): UseMutationResult<
mutationFn: (request: CostHelloCallRequest) => postCostHelloCall(request),
onSuccess: () => {
alert('안부전화 서비스가 신청되었습니다.');
window.location.reload();
},
onError: (error) => {
console.error('안부전화 서비스 신청에 실패했습니다.', error);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export const usePutHelloCall = (
onSuccess: () => {
queryClient.invalidateQueries({ queryKey: [HelloCallQueryKey, callId] });
alert('안부전화 서비스가 수정되었습니다.');
window.location.reload();
},
onError: (error) => {
console.error('안부전화 서비스 수정에 실패했습니다.', error);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useInfiniteQuery } from '@tanstack/react-query';
export const useGetServiceList = () => {
return useInfiniteQuery<ServiceListResponse, Error>({
queryKey: ServiceListQueryKey,
queryFn: ({ pageParam = 0 }) => getServiceList(pageParam as number),
queryFn: ({ pageParam = 0 }) => getServiceList(Number(pageParam)),
getNextPageParam: (lastPage, allPages) =>
lastPage.content.length > 0 ? allPages.length : undefined,
initialPageParam: 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ export const usePutCancelHelloCall = (
onSuccess: () => {
queryClient.invalidateQueries({ queryKey: CancelHelloCallQueryKey });
alert('안부전화 서비스가 취소되었습니다.');
window.location.reload();
},
onError: (error) => {
console.error('안부전화 서비스 취소에 실패했습니다.', error);
Expand Down

0 comments on commit 10c86cd

Please sign in to comment.