우리술 도장을
- {numberOfStampedDrinks}개 모았어요.
+ {enjoyedDrinkCount}개 모았어요.
diff --git a/apps/jurumarble/src/app/stamp/service/useDrinkStampListService.ts b/apps/jurumarble/src/app/stamp/service/useDrinkStampListService.ts
index 11018a63..972c107f 100644
--- a/apps/jurumarble/src/app/stamp/service/useDrinkStampListService.ts
+++ b/apps/jurumarble/src/app/stamp/service/useDrinkStampListService.ts
@@ -22,7 +22,8 @@ export default function useDrinkStampListService(params: DrinkStampListProps) {
page: pageParam?.page || params.page,
}),
{
- getNextPageParam: ({ last, number }) => {
+ getNextPageParam: ({ drinkData }) => {
+ const { last, number } = drinkData;
if (last) {
return undefined;
}
@@ -34,11 +35,11 @@ export default function useDrinkStampListService(params: DrinkStampListProps) {
},
);
- const numberOfStampedDrinks = data?.pages[0].numberOfElements ?? 0;
+ const enjoyedDrinkCount = data?.pages[0].enjoyedDrinkCount ?? 0;
- const drinkList = data?.pages.flatMap((page) => page.content) ?? [];
+ const drinkList = data?.pages.flatMap((page) => page.drinkData.content) ?? [];
const [subscribe] = useInfiniteScroll(fetchNextPage);
- return { drinkList, fetchNextPage, subscribe, numberOfStampedDrinks };
+ return { drinkList, fetchNextPage, subscribe, enjoyedDrinkCount };
}
diff --git a/apps/jurumarble/src/app/vote/[id]/update/hook/useUpdataVoteForm.ts b/apps/jurumarble/src/app/vote/[id]/update/hook/useUpdataVoteForm.ts
index 9b83caab..ea01c055 100644
--- a/apps/jurumarble/src/app/vote/[id]/update/hook/useUpdataVoteForm.ts
+++ b/apps/jurumarble/src/app/vote/[id]/update/hook/useUpdataVoteForm.ts
@@ -3,7 +3,7 @@ import React, { useEffect, useState } from 'react';
import { useMutation, useQueryClient } from '@tanstack/react-query';
import Path from 'lib/Path';
import { modifyDrinkVoteAPI, modifyNormalVoteAPI } from 'lib/apis/vote';
-import { queryKeys } from 'lib/queryKeys';
+import { queryKeys, reactQueryKeys } from 'lib/queryKeys';
import { useParams, useRouter } from 'next/navigation';
import { DrinkInfoType } from 'src/types/drink';
import { PostVoteType } from 'src/types/vote';
@@ -27,7 +27,8 @@ export default function useUpdateVoteForm() {
const queryClient = useQueryClient();
const params = useParams();
- const { data } = useVoteLoadService(Number(params.id));
+ const voteId = Number(params.id);
+ const { data } = useVoteLoadService(voteId);
const [postVoteInfo, setPostVoteInfo] = useState