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';