From 5d01156d42f8b536e689ee474f4fc2e85a124715 Mon Sep 17 00:00:00 2001 From: kimsuyeon_0916 Date: Thu, 2 May 2024 21:49:50 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=ED=8F=AC=ED=8A=B8=ED=8F=B4=EB=A6=AC?= =?UTF-8?q?=EC=98=A4=20=EC=9D=B4=EB=AF=B8=EC=A7=80=201=EB=B2=88=EC=A7=B8?= =?UTF-8?q?=20=ED=8E=B8=EC=A7=91=20=EC=9D=B4=ED=9B=84,=202=EB=B2=88?= =?UTF-8?q?=EC=A7=B8=20=ED=8E=B8=EC=A7=91=EC=8B=9C=EC=97=90=20=ED=8F=BC?= =?UTF-8?q?=EC=9D=B4=20=EC=A0=9C=EC=B6=9C=EC=9D=B4=20=EC=95=88=EB=90=98?= =?UTF-8?q?=EB=8A=94=20=EB=B2=84=EA=B7=B8=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - useEffect 의존성 배열 내 isSuccessReadUrl -> imageResponse 변경 --- src/pages/portfolio/edit/PortfolioEditPage.tsx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/pages/portfolio/edit/PortfolioEditPage.tsx b/src/pages/portfolio/edit/PortfolioEditPage.tsx index c0b7e690..0978eac1 100644 --- a/src/pages/portfolio/edit/PortfolioEditPage.tsx +++ b/src/pages/portfolio/edit/PortfolioEditPage.tsx @@ -98,11 +98,10 @@ const PortfolioEditPage = () => { const [isSubmitted, setIsSubmitted] = useState(false); const uploadImageList = useRecoilValue(uploadImageListState); - const { - data: imageResponse, - refetch: readImageListPresignedUrl, - isSuccess: isSuccessReadUrl, - } = useReadImageListPresignedUrl(uploadImageList[0]?.fileName as string, portfolioId); + const { data: imageResponse, refetch: readImageListPresignedUrl } = useReadImageListPresignedUrl( + uploadImageList[0]?.fileName as string, + portfolioId + ); const uploadImageFileInSuccess = () => { if (!isSubmitted && imageResponse) { @@ -156,7 +155,7 @@ const PortfolioEditPage = () => { }); }); } - }, [isSuccessReadUrl]); + }, [imageResponse]); const submitHandler: SubmitHandler = () => { readImageListPresignedUrl(); // presignedUrl 발급