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) }) }