Skip to content

Commit

Permalink
🚨 Fix: 이전 포스팅 불러오기 UI 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
suyeon1218 authored Sep 25, 2023
2 parents 26c24ef + 31de2b2 commit 3c1be96
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
12 changes: 8 additions & 4 deletions src/components/Confirm/Confirm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ interface ConfirmProps {
nextPageLink: string;
CancelButton: React.ReactNode | (() => JSX.Element);
ConfirmButton: React.ReactNode | (() => JSX.Element);
linkState: { [key: string]: any };
linkState?: { [key: string]: any };
}

const Confirm = ({
Expand All @@ -31,7 +31,7 @@ const Confirm = ({
}: Partial<ConfirmProps>) => {
const [disabled, setDisabled] = useState(false);
const [domReady, setDomReady] = useState(false);

const FormedCancelButton =
typeof CancelButton === 'function' ? CancelButton() : CancelButton;
const FormedConfirmlButton =
Expand All @@ -53,9 +53,13 @@ const Confirm = ({
{content}
<NavButtonContainer>
<CancelButtonDefaultEvent onClick={() => setDisabled(true)}>
{CancelButton}
{FormedCancelButton}
</CancelButtonDefaultEvent>
<Link pageLink={nextPageLink}>{ConfirmButton}</Link>
<Link
state={linkState}
pageLink={nextPageLink}>
{FormedConfirmlButton}
</Link>
</NavButtonContainer>
</ContentContainer>
</StyledConfirmBackground>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Link/Link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ interface LinkProps {
children: React.ReactNode;
pageLink: string;
size: number;
color: string;
color: keyof typeof color;
state: State;
}

const Link = ({
Expand Down
2 changes: 1 addition & 1 deletion src/pages/posting/Posting.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const Posting = () => {
if (location.state === null) {
navigate('/404');
}

console.log(location.state);
setMeditationInfo(location.state);
}, []);

Expand Down

0 comments on commit 3c1be96

Please sign in to comment.