From 3483018c9c1b3be9d5259a2c4fe704b454c0c225 Mon Sep 17 00:00:00 2001 From: shinhyojeong Date: Fri, 2 Feb 2024 00:42:16 +0900 Subject: [PATCH 1/3] =?UTF-8?q?fix:=20=EC=BA=90=EB=9F=AC=EC=A0=A4=20?= =?UTF-8?q?=ED=99=94=EC=82=B4=ED=91=9C=20=ED=81=B4=EB=A6=AD=EC=8B=9C=20?= =?UTF-8?q?=EB=AA=A8=EB=8B=AC=20=EB=9C=A8=EC=A7=80=20=EC=95=8A=EB=8F=84?= =?UTF-8?q?=EB=A1=9D,=20=EB=B3=B4=EA=B3=A0=EC=9E=88=EB=8A=94=20=EC=9D=B4?= =?UTF-8?q?=EB=AF=B8=EC=A7=80=EB=A5=BC=20=EB=AA=A8=EB=8B=AC=EB=A1=9C=20?= =?UTF-8?q?=EB=9D=84=EC=9A=B0=EB=8F=84=EB=A1=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/post/[postId]/index.tsx | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/pages/post/[postId]/index.tsx b/src/pages/post/[postId]/index.tsx index 4a6e6a6d..c51bd321 100644 --- a/src/pages/post/[postId]/index.tsx +++ b/src/pages/post/[postId]/index.tsx @@ -48,6 +48,7 @@ const PostDetailPage = ({ postId }: Props): ReactElement => { const router = useRouter() const [tradeStatus, setTradeStatus] = useState() + const [selectedImageIndex, setSelectedImageIndex] = useState(0) const tradeStatusDialog = useModal() const deleteModal = useModal() @@ -84,14 +85,14 @@ const PostDetailPage = ({ postId }: Props): ReactElement => { <>
-
- -
+ setSelectedImageIndex(idx)} + onClickImage={imageModal.openModal} + />
@@ -179,6 +180,7 @@ const PostDetailPage = ({ postId }: Props): ReactElement => { images={postImages} isOpen={imageModal.isOpen} name="post-detail" + selectedIndex={selectedImageIndex} onClose={imageModal.closeModal} /> Date: Fri, 2 Feb 2024 00:46:11 +0900 Subject: [PATCH 2/3] =?UTF-8?q?feat:=20=ED=8F=AC=EC=8A=A4=ED=8C=85=20-=20?= =?UTF-8?q?=EC=A0=9C=EB=AA=A9=20=EC=9E=85=EB=A0=A5=20=EA=B8=80=EC=9E=90=20?= =?UTF-8?q?=EC=88=98=20=EA=B8=B0=EB=B3=B8=EA=B0=92=20=EC=B6=94=EA=B0=80?= =?UTF-8?q?=ED=95=98=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/post/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/post/index.tsx b/src/pages/post/index.tsx index 12d76a64..3bc85054 100644 --- a/src/pages/post/index.tsx +++ b/src/pages/post/index.tsx @@ -189,7 +189,7 @@ const PostPage = ({ type, editPostId }: Props): ReactElement => { onChange={e => handleUpdatePostForm('title', e.target.value)} /> - {postForm.title?.length}/40 + {postForm.title?.length || 0}/40
From 6ca5939785b0c202e39cfaa881542d0b516efec5 Mon Sep 17 00:00:00 2001 From: shinhyojeong Date: Fri, 2 Feb 2024 00:47:07 +0900 Subject: [PATCH 3/3] =?UTF-8?q?chore:=20=EA=B0=80=EB=8F=85=EC=84=B1?= =?UTF-8?q?=EC=9D=84=20=EC=9C=84=ED=95=9C=20handler=20=EB=B6=84=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/post/[postId]/index.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pages/post/[postId]/index.tsx b/src/pages/post/[postId]/index.tsx index c51bd321..6d69ad63 100644 --- a/src/pages/post/[postId]/index.tsx +++ b/src/pages/post/[postId]/index.tsx @@ -81,6 +81,10 @@ const PostDetailPage = ({ postId }: Props): ReactElement => { return <> } + const handleChangeIndicator = (idx: number) => { + setSelectedImageIndex(idx) + } + return ( <> @@ -90,7 +94,7 @@ const PostDetailPage = ({ postId }: Props): ReactElement => { isArrow name="post-carousel" selectedIndex={0} - onChangeIndicator={idx => setSelectedImageIndex(idx)} + onChangeIndicator={handleChangeIndicator} onClickImage={imageModal.openModal} />