From 278beacf8913b50929358f88178547e0616dde60 Mon Sep 17 00:00:00 2001 From: Cheshier Date: Wed, 27 Sep 2023 18:43:56 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=C2=A0Chore:=20=EC=A4=91=EB=B3=B5?= =?UTF-8?q?=20import=EB=AC=B8=20=EC=A0=9C=EA=B1=B0=20&=20=ED=83=80?= =?UTF-8?q?=EC=9E=85=20=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Confirm/Confirm.tsx | 9 +++++---- src/components/PostPreview/PostHeader.tsx | 3 +-- src/pages/meditation/components/PrevPostingConfirm.tsx | 4 ++-- src/pages/postDetail/components/PostContent.tsx | 1 - 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/components/Confirm/Confirm.tsx b/src/components/Confirm/Confirm.tsx index 3764f662..4bb4ebf2 100644 --- a/src/components/Confirm/Confirm.tsx +++ b/src/components/Confirm/Confirm.tsx @@ -9,6 +9,7 @@ import { StyledConfirmBackground, StyledDeemBackground } from './Confirm.style'; +import { prevPostingInfo } from '@pages/meditation/components/PrevPostingConfirm'; interface ConfirmProps { emoji: string; @@ -17,7 +18,7 @@ interface ConfirmProps { nextPageLink: string; CancelButton: React.ReactNode | (() => JSX.Element); ConfirmButton: React.ReactNode | (() => JSX.Element); - linkState?: { [key: string]: number | string | boolean }; + linkState?: { [key: string]: string | number | boolean | prevPostingInfo }; } const Confirm = ({ @@ -34,7 +35,7 @@ const Confirm = ({ const FormedCancelButton = typeof CancelButton === 'function' ? CancelButton() : CancelButton; - const FormedConfirmlButton = + const FormedConfirmButton = typeof ConfirmButton === 'function' ? ConfirmButton() : ConfirmButton; useEffect(() => { @@ -59,10 +60,10 @@ const Confirm = ({ - {FormedConfirmlButton} + {FormedConfirmButton} ) : ( - FormedConfirmlButton + FormedConfirmButton )} diff --git a/src/components/PostPreview/PostHeader.tsx b/src/components/PostPreview/PostHeader.tsx index baf9d402..67f40842 100644 --- a/src/components/PostPreview/PostHeader.tsx +++ b/src/components/PostPreview/PostHeader.tsx @@ -7,8 +7,7 @@ import { PostDetailInfoContainer, UserContainer, NameContainer, - IdContainer, - PostInfoContainer + IdContainer } from './PostPreview.style'; import { Link } from '@components/Link'; import { UserId } from '@components/UserText'; diff --git a/src/pages/meditation/components/PrevPostingConfirm.tsx b/src/pages/meditation/components/PrevPostingConfirm.tsx index bec9209b..0835ea4e 100644 --- a/src/pages/meditation/components/PrevPostingConfirm.tsx +++ b/src/pages/meditation/components/PrevPostingConfirm.tsx @@ -1,7 +1,7 @@ import { Confirm } from '@components/Confirm'; import { Button } from '@components/Button'; -interface prevPostingInfo { +export interface prevPostingInfo { posting: string; channelId: string; validation: boolean; @@ -57,7 +57,7 @@ const PrevPostingConfirm = ({ ConfirmButton={ConfirmButton} CancelButton={CancelButton} nextPageLink='/posting' - linkState={prevPostingInfo} + linkState={{ prevPostingInfo }} /> ; diff --git a/src/pages/postDetail/components/PostContent.tsx b/src/pages/postDetail/components/PostContent.tsx index c31d8fd2..294654ab 100644 --- a/src/pages/postDetail/components/PostContent.tsx +++ b/src/pages/postDetail/components/PostContent.tsx @@ -13,7 +13,6 @@ import { PostContentMenu, PostEditConfirmButtonContainer } from './PostContent.style'; -import PostHeader from '@components/PostPreview/PostHeader'; import { Toast } from '@components/Toast'; import { deletePost, putPost } from '@apis/posts'; import { Button } from '@components/Button';