Skip to content

Commit

Permalink
refactor #128: 잘못된 코드 수정
Browse files Browse the repository at this point in the history
- 클린업 함수 내 로직
- 불필요한 async
  • Loading branch information
sjuhan123 committed Sep 25, 2023
1 parent 1fe605d commit bc9423c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fe/src/hooks/useFetch/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const useFetch = <R,>({ fetchFn, suspense = false }: useFetchProps) => {
const [error, setError] = useState<Error | null>(null);

const fetch = useCallback(
async ({ fetchFn }: fetchProps) => {
({ fetchFn }: fetchProps) => {
if (!fetchFn) return;
setStatus(API_STATUS.LOADING);

Expand Down
2 changes: 1 addition & 1 deletion fe/src/hooks/usePullToRefresh/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ const usePullToRefresh = ({
container.addEventListener('touchend', handleTouchEnd);

return () => {
container.addEventListener('touchstart', handleTouchStart);
container.removeEventListener('touchstart', handleTouchStart);
container.removeEventListener('touchmove', handleTouchMove);
container.removeEventListener('touchend', handleTouchEnd);
};
Expand Down

0 comments on commit bc9423c

Please sign in to comment.