From bec2aa8708d2f425a32b041d13caf1479d79629d Mon Sep 17 00:00:00 2001 From: chaduhwan Date: Mon, 8 Apr 2024 15:57:44 +0900 Subject: [PATCH] =?UTF-8?q?[fix]=20bulid=20eslint=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/(route)/list/_components/nav/LIstCompo.tsx | 3 ++- app/(route)/onboard/_components/WatchWord.tsx | 8 +++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/app/(route)/list/_components/nav/LIstCompo.tsx b/app/(route)/list/_components/nav/LIstCompo.tsx index 3626e05..6d1ee50 100644 --- a/app/(route)/list/_components/nav/LIstCompo.tsx +++ b/app/(route)/list/_components/nav/LIstCompo.tsx @@ -7,7 +7,7 @@ import { Root, Tool } from '@/app/_constants/toolcard' import ToolCard from '@/app/_components/card/toolCard' function ListCompo() { - const { data, isFetching } = useQuery>({ + const { data } = useQuery>({ queryKey: ['getToolList'], queryFn: () => axios.get('http://222.121.148.192/api/toolDetails'), }) @@ -26,6 +26,7 @@ function ListCompo() { toolImg={data?.toolImg || ''} toolId={index} company={data?.company} + key={index} /> ) })} diff --git a/app/(route)/onboard/_components/WatchWord.tsx b/app/(route)/onboard/_components/WatchWord.tsx index 87672ee..174ad41 100644 --- a/app/(route)/onboard/_components/WatchWord.tsx +++ b/app/(route)/onboard/_components/WatchWord.tsx @@ -24,17 +24,15 @@ function WatchWord({ return () => { animationRef.current?.removeEventListener('animationend', animationend) } - }, []) + }, [handleView]) // handleView를 의존성 배열에 추가 useEffect(() => { const timer = setTimeout(() => { - { - onAnimationEnd && onAnimationEnd() - } + onAnimationEnd && onAnimationEnd() }, 2000) return () => clearTimeout(timer) - }, []) + }, [onAnimationEnd]) // onAnimationEnd를 의존성 배열에 추가 const handleAnimationEnd = () => { onAnimationEnd && onAnimationEnd()