From d78b82edad8b9b82ea3e6467cc4c16b06874975e Mon Sep 17 00:00:00 2001 From: "lkh14011424@gmail.com" Date: Sat, 14 Sep 2024 18:48:14 +0900 Subject: [PATCH] =?UTF-8?q?[feat/#46]=20=EB=B9=8C=EB=93=9C=20=EC=98=A4?= =?UTF-8?q?=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/group.ts | 2 +- src/components/Crew/CrewList.tsx | 2 +- src/hooks/useGroupMutation.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/api/group.ts b/src/api/group.ts index e35b6db..eec5675 100644 --- a/src/api/group.ts +++ b/src/api/group.ts @@ -63,7 +63,7 @@ export const getGroups = async (groupsReq: groupsReq): Promise => { } } -export const getGroup = async (id: number): Promise => { +export const getGroup = async (id: number | undefined): Promise => { try { const res = await axiosInstance.get(`/groups/${id}`) return res.data.data diff --git a/src/components/Crew/CrewList.tsx b/src/components/Crew/CrewList.tsx index 80801b8..7471844 100644 --- a/src/components/Crew/CrewList.tsx +++ b/src/components/Crew/CrewList.tsx @@ -60,7 +60,7 @@ const CrewList = (): ReactElement => { } const createSortList = (): JSX.Element[] => { - return SORT_LIST.map((s, i) => ( + return SORT_LIST.map((s) => ( // eslint-disable-next-line max-len
({ queryKey: ["groups", params], queryFn: () => getGroups(params) }) } -export const useGetGroup = (id: number): UseQueryResult => { +export const useGetGroup = (id: number | undefined): UseQueryResult => { // eslint-disable-next-line max-len return useQuery({ queryKey: ["group", id], queryFn: () => getGroup(id) }) }