Skip to content

Commit 278beac

Browse files
committed
📝 Chore: 중복 import문 제거 & 타입 오류 수정
1 parent 7a8e1b5 commit 278beac

File tree

4 files changed

+8
-9
lines changed

4 files changed

+8
-9
lines changed

src/components/Confirm/Confirm.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
StyledConfirmBackground,
1010
StyledDeemBackground
1111
} from './Confirm.style';
12+
import { prevPostingInfo } from '@pages/meditation/components/PrevPostingConfirm';
1213

1314
interface ConfirmProps {
1415
emoji: string;
@@ -17,7 +18,7 @@ interface ConfirmProps {
1718
nextPageLink: string;
1819
CancelButton: React.ReactNode | (() => JSX.Element);
1920
ConfirmButton: React.ReactNode | (() => JSX.Element);
20-
linkState?: { [key: string]: number | string | boolean };
21+
linkState?: { [key: string]: string | number | boolean | prevPostingInfo };
2122
}
2223

2324
const Confirm = ({
@@ -34,7 +35,7 @@ const Confirm = ({
3435

3536
const FormedCancelButton =
3637
typeof CancelButton === 'function' ? CancelButton() : CancelButton;
37-
const FormedConfirmlButton =
38+
const FormedConfirmButton =
3839
typeof ConfirmButton === 'function' ? ConfirmButton() : ConfirmButton;
3940

4041
useEffect(() => {
@@ -59,10 +60,10 @@ const Confirm = ({
5960
<Link
6061
state={linkState}
6162
pageLink={nextPageLink}>
62-
{FormedConfirmlButton}
63+
{FormedConfirmButton}
6364
</Link>
6465
) : (
65-
FormedConfirmlButton
66+
FormedConfirmButton
6667
)}
6768
</NavButtonContainer>
6869
</ContentContainer>

src/components/PostPreview/PostHeader.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ import {
77
PostDetailInfoContainer,
88
UserContainer,
99
NameContainer,
10-
IdContainer,
11-
PostInfoContainer
10+
IdContainer
1211
} from './PostPreview.style';
1312
import { Link } from '@components/Link';
1413
import { UserId } from '@components/UserText';

src/pages/meditation/components/PrevPostingConfirm.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Confirm } from '@components/Confirm';
22
import { Button } from '@components/Button';
33

4-
interface prevPostingInfo {
4+
export interface prevPostingInfo {
55
posting: string;
66
channelId: string;
77
validation: boolean;
@@ -57,7 +57,7 @@ const PrevPostingConfirm = ({
5757
ConfirmButton={ConfirmButton}
5858
CancelButton={CancelButton}
5959
nextPageLink='/posting'
60-
linkState={prevPostingInfo}
60+
linkState={{ prevPostingInfo }}
6161
/>
6262
;
6363
</>

src/pages/postDetail/components/PostContent.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import {
1313
PostContentMenu,
1414
PostEditConfirmButtonContainer
1515
} from './PostContent.style';
16-
import PostHeader from '@components/PostPreview/PostHeader';
1716
import { Toast } from '@components/Toast';
1817
import { deletePost, putPost } from '@apis/posts';
1918
import { Button } from '@components/Button';

0 commit comments

Comments
 (0)