From fc2beeaa66b03dcee8ae0b163f2b451edbab252a Mon Sep 17 00:00:00 2001 From: 40food <40food@naver.com> Date: Thu, 12 Dec 2024 04:08:33 +0900 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20PA=20artwork=20sequence=20top?= =?UTF-8?q?=ED=91=9C=EC=8B=9C=EC=95=88=EB=90=A8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Artwork/ArtworkSequence/ArtworkSequence.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/components/PromotionAdmin/Artwork/ArtworkSequence/ArtworkSequence.tsx b/src/components/PromotionAdmin/Artwork/ArtworkSequence/ArtworkSequence.tsx index b968079..2057fef 100644 --- a/src/components/PromotionAdmin/Artwork/ArtworkSequence/ArtworkSequence.tsx +++ b/src/components/PromotionAdmin/Artwork/ArtworkSequence/ArtworkSequence.tsx @@ -151,8 +151,7 @@ const ArtworkSequence = ({ type, data, isLoading, error, refetch }: ArtworkSeque ) : onEdit ? ( {type === 'main' //main sequence면 top 고정 - ? realData - ?.filter((i) => i.projectType === 'top') + ? data?.filter((i) => i.projectType === 'top') .map((i) => (
@@ -183,8 +182,7 @@ const ArtworkSequence = ({ type, data, isLoading, error, refetch }: ArtworkSeque
{/*edit 모드 아니면 일반 리스트*/} {type === 'main' //main sequence면 top 고정 - ? realData - ?.filter((i) => i.projectType === 'top') + ? data?.filter((i) => i.projectType === 'top') .map((i) => (
From a94bdbabaaf82b73a3bb3706cc23b5147d95fb4a Mon Sep 17 00:00:00 2001 From: 40food <40food@naver.com> Date: Thu, 12 Dec 2024 22:40:47 +0900 Subject: [PATCH 2/2] =?UTF-8?q?hotfix:=20pp=20artwork=20detail=20=EC=9D=B4?= =?UTF-8?q?=EC=8A=88=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - detail에서 새고하면 네비게이션 문제 - detail 이미지 문제 --- src/components/PromotionPage/ArtworkDetail/ImageSlider.tsx | 3 ++- src/pages/PromotionPage/ArtworkPage/ArtworkDetailPage.tsx | 7 +++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/PromotionPage/ArtworkDetail/ImageSlider.tsx b/src/components/PromotionPage/ArtworkDetail/ImageSlider.tsx index fab5fab..04b9900 100644 --- a/src/components/PromotionPage/ArtworkDetail/ImageSlider.tsx +++ b/src/components/PromotionPage/ArtworkDetail/ImageSlider.tsx @@ -27,6 +27,7 @@ function ImageSlider({ projectImages }: IImageSliderProps) { return (
+ {projectImages[index] && projectImages[index].imageUrlList && ( + />)}
{projectImages.map((_, pageIndex) => ( diff --git a/src/pages/PromotionPage/ArtworkPage/ArtworkDetailPage.tsx b/src/pages/PromotionPage/ArtworkPage/ArtworkDetailPage.tsx index fa4f855..3901032 100644 --- a/src/pages/PromotionPage/ArtworkPage/ArtworkDetailPage.tsx +++ b/src/pages/PromotionPage/ArtworkPage/ArtworkDetailPage.tsx @@ -23,9 +23,8 @@ function ArtworkDetailPage() { const { data, isLoading } = useQuery(['artwork', 'id'], getArtworkData); const [filteredData,setFilteredData]=useState([]) - const clickedArtwork = - artworkDetailMatch?.params.id && data?.data.find((artwork) => String(artwork.id) === artworkDetailMatch.params.id); - useEffect(()=>{ + const clickedArtwork = artworkDetailMatch?.params.id && data?.data.find((artwork) => String(artwork.id) === artworkDetailMatch.params.id); + useEffect(()=>{ if(data){ if(artworkDetailMatch?.params.category!=="all"){ setFilteredData(data.data.filter((d)=>{return d.category===artworkDetailMatch?.params.category! && d.isPosted===true})) @@ -34,7 +33,7 @@ function ArtworkDetailPage() { setFilteredData(data.data.filter((d)=>{return d.isPosted===true})) } } - },[]) + },[data, artworkDetailMatch?.params.category]) // animation const { scrollYProgress } = useScroll();