Skip to content

Commit

Permalink
📝 Chore: 중복 import문 제거 & 타입 오류 수정
Browse files Browse the repository at this point in the history
📝 Chore: 중복 import문 제거 & 타입 오류 수정
  • Loading branch information
sscoderati authored Sep 27, 2023
2 parents 7a8e1b5 + 278beac commit ace7ebf
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
9 changes: 5 additions & 4 deletions src/components/Confirm/Confirm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
StyledConfirmBackground,
StyledDeemBackground
} from './Confirm.style';
import { prevPostingInfo } from '@pages/meditation/components/PrevPostingConfirm';

interface ConfirmProps {
emoji: string;
Expand All @@ -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 = ({
Expand All @@ -34,7 +35,7 @@ const Confirm = ({

const FormedCancelButton =
typeof CancelButton === 'function' ? CancelButton() : CancelButton;
const FormedConfirmlButton =
const FormedConfirmButton =
typeof ConfirmButton === 'function' ? ConfirmButton() : ConfirmButton;

useEffect(() => {
Expand All @@ -59,10 +60,10 @@ const Confirm = ({
<Link
state={linkState}
pageLink={nextPageLink}>
{FormedConfirmlButton}
{FormedConfirmButton}
</Link>
) : (
FormedConfirmlButton
FormedConfirmButton
)}
</NavButtonContainer>
</ContentContainer>
Expand Down
3 changes: 1 addition & 2 deletions src/components/PostPreview/PostHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ import {
PostDetailInfoContainer,
UserContainer,
NameContainer,
IdContainer,
PostInfoContainer
IdContainer
} from './PostPreview.style';
import { Link } from '@components/Link';
import { UserId } from '@components/UserText';
Expand Down
4 changes: 2 additions & 2 deletions src/pages/meditation/components/PrevPostingConfirm.tsx
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -57,7 +57,7 @@ const PrevPostingConfirm = ({
ConfirmButton={ConfirmButton}
CancelButton={CancelButton}
nextPageLink='/posting'
linkState={prevPostingInfo}
linkState={{ prevPostingInfo }}
/>
;
</>
Expand Down
1 change: 0 additions & 1 deletion src/pages/postDetail/components/PostContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit ace7ebf

Please sign in to comment.