From 27a0b42d15bd7678de8b9fc4663ff870d12dcad4 Mon Sep 17 00:00:00 2001 From: eunhak Date: Fri, 22 Mar 2024 17:26:28 +0900 Subject: [PATCH] fix: lint fix --- src/remote/api/requests/favorite/favorite.get.api.ts | 2 +- src/remote/queries/favorite/addFavoriteList.ts | 7 ++++--- src/remote/queries/favorite/deleteFavoriteList.ts | 7 ++++--- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/remote/api/requests/favorite/favorite.get.api.ts b/src/remote/api/requests/favorite/favorite.get.api.ts index 49ff0e1..dd6b77d 100644 --- a/src/remote/api/requests/favorite/favorite.get.api.ts +++ b/src/remote/api/requests/favorite/favorite.get.api.ts @@ -9,7 +9,7 @@ export const getFavoriteList = async ( pageNum: number, size: number, // eslint-disable-next-line @typescript-eslint/no-unused-vars - sortType: SearchFilterType + sortType: SearchFilterType, ) => { // TODO: 필터 기능 추가 // const response = await getRequest(`/likes/search?sortType=${sortType}&page=${pageNum}&size=${size}`); diff --git a/src/remote/queries/favorite/addFavoriteList.ts b/src/remote/queries/favorite/addFavoriteList.ts index bdd0a14..5b9f0bc 100644 --- a/src/remote/queries/favorite/addFavoriteList.ts +++ b/src/remote/queries/favorite/addFavoriteList.ts @@ -1,9 +1,10 @@ // optimistic UPdate로 즐겨찾기 구현 -import { postFavoriteList } from '@/remote/api/requests/favorite/favorite.get.api'; import { useMutation } from '@tanstack/react-query'; -function addFavoriteList() { +import { postFavoriteList } from '@/remote/api/requests/favorite/favorite.get.api'; + +function useAddFavoriteList() { return useMutation({ mutationFn: postFavoriteList, onSuccess: () => {}, @@ -11,4 +12,4 @@ function addFavoriteList() { }); } -export default addFavoriteList; +export default useAddFavoriteList; diff --git a/src/remote/queries/favorite/deleteFavoriteList.ts b/src/remote/queries/favorite/deleteFavoriteList.ts index 207f396..dd0c177 100644 --- a/src/remote/queries/favorite/deleteFavoriteList.ts +++ b/src/remote/queries/favorite/deleteFavoriteList.ts @@ -1,9 +1,10 @@ // optimistic UPdate로 즐겨찾기 구현 -import { delFavoriteList } from '@/remote/api/requests/favorite/favorite.get.api'; import { useMutation } from '@tanstack/react-query'; -function deleteFavoriteList() { +import { delFavoriteList } from '@/remote/api/requests/favorite/favorite.get.api'; + +function useDeleteFavoriteList() { return useMutation({ mutationFn: delFavoriteList, onSuccess: () => {}, @@ -11,4 +12,4 @@ function deleteFavoriteList() { }); } -export default deleteFavoriteList; +export default useDeleteFavoriteList;