From 85148afe221214a88489d998275e283f300cab67 Mon Sep 17 00:00:00 2001 From: mintmin Date: Fri, 29 Mar 2024 11:13:42 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=83=81=EC=84=B8=20=EC=9D=B4=EB=AF=B8?= =?UTF-8?q?=EC=A7=80=20=EB=A1=9C=EC=BB=AC=20=EC=8A=A4=ED=86=A0=EB=A6=AC?= =?UTF-8?q?=EC=A7=80=20=ED=81=B4=EB=9D=BC=EC=9D=B4=EC=96=B8=ED=8A=B8=20?= =?UTF-8?q?=EC=A0=91=EA=B7=BC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../items/review-images/_component/DetailImage.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/app/(route)/(withLayout)/items/review-images/_component/DetailImage.tsx b/src/app/(route)/(withLayout)/items/review-images/_component/DetailImage.tsx index a2ec914e..06d914d0 100644 --- a/src/app/(route)/(withLayout)/items/review-images/_component/DetailImage.tsx +++ b/src/app/(route)/(withLayout)/items/review-images/_component/DetailImage.tsx @@ -2,10 +2,15 @@ import { LocalStorage } from '@/app/_utils/localStorage' import Image from 'next/image' -import { useEffect, useMemo, useState } from 'react' +import { useEffect, useState } from 'react' export default function DetailImage() { - const imageUrls = useMemo(() => LocalStorage.imageUrls().getter(), []) + const [imageUrls, setImageUrls] = useState([]) + + useEffect(() => { + const storedImageUrls = LocalStorage.imageUrls().getter() || [] + setImageUrls(storedImageUrls) + }, []) const [selectedImageUrl, setSelectedImageUrl] = useState( imageUrls[0] || '/image/icon/icon-close.svg',