Skip to content

Commit

Permalink
refactor : rank Api fetcher params 묶기
Browse files Browse the repository at this point in the history
  • Loading branch information
jasper200207 committed Jan 18, 2024
1 parent 8878269 commit efc81d5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/api/attendanceApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const useGetTodayAttendanceRank = ({ page, size = 10 }: PageAndSize) => {
const fetcher = () =>
axios
.get('/attendances/today-rank', {
params: { page, size },
params,
})
.then(({ data }) => data);

Expand Down
2 changes: 1 addition & 1 deletion src/api/memberApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ const useDeleteMemberMutation = () => {
const useGetPointRank = ({ page, size = 10 }: PageAndSize) => {
const params = { page, size };

const fetcher = () => axios.get('/members/point-rank', { params: { page, size } }).then(({ data }) => data);
const fetcher = () => axios.get('/members/point-rank', { params }).then(({ data }) => data);

return useQuery<PointRank>(memberKeys.pointRank(params), fetcher, {
keepPreviousData: true,
Expand Down

0 comments on commit efc81d5

Please sign in to comment.