Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

📝 Chore: 중복 import문 제거 & 타입 오류 수정 #151

Merged
merged 1 commit into from
Sep 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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