From fad0857a72b498a18d6d950d4c9cb4c822713c82 Mon Sep 17 00:00:00 2001 From: Suyeon Date: Mon, 25 Sep 2023 14:40:56 +0900 Subject: [PATCH 01/10] =?UTF-8?q?=F0=9F=9A=A8=20Fix:=20=EC=9D=B4=EC=A0=84?= =?UTF-8?q?=20=ED=8F=AC=EC=8A=A4=ED=8C=85=20=EB=B6=88=EB=9F=AC=EC=98=A4?= =?UTF-8?q?=EA=B8=B0=20UI=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Confirm 컴포넌트에서 변형한 변수가 적용되지 않고 있던 문제를 해결했습니다. --- src/components/Confirm/Confirm.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/Confirm/Confirm.tsx b/src/components/Confirm/Confirm.tsx index 8345d745..6a407c65 100644 --- a/src/components/Confirm/Confirm.tsx +++ b/src/components/Confirm/Confirm.tsx @@ -31,7 +31,7 @@ const Confirm = ({ }: Partial) => { const [disabled, setDisabled] = useState(false); const [domReady, setDomReady] = useState(false); - + const FormedCancelButton = typeof CancelButton === 'function' ? CancelButton() : CancelButton; const FormedConfirmlButton = @@ -53,9 +53,9 @@ const Confirm = ({ {content} setDisabled(true)}> - {CancelButton} + {FormedCancelButton} - {ConfirmButton} + {FormedConfirmlButton} From 860da2d5b5425930480329ce39b4ecab1a4b6808 Mon Sep 17 00:00:00 2001 From: Suyeon Date: Mon, 25 Sep 2023 14:52:55 +0900 Subject: [PATCH 02/10] =?UTF-8?q?=F0=9F=9A=A8=20Fix:=20Link=20State=20?= =?UTF-8?q?=EC=A0=81=EC=9A=A9=20=EC=95=88=EB=90=9C=20=EB=AC=B8=EC=A0=9C=20?= =?UTF-8?q?=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Confirm/Confirm.tsx | 6 +++++- src/pages/posting/Posting.tsx | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/Confirm/Confirm.tsx b/src/components/Confirm/Confirm.tsx index 6a407c65..6e2e125d 100644 --- a/src/components/Confirm/Confirm.tsx +++ b/src/components/Confirm/Confirm.tsx @@ -55,7 +55,11 @@ const Confirm = ({ setDisabled(true)}> {FormedCancelButton} - {FormedConfirmlButton} + + {FormedConfirmlButton} + diff --git a/src/pages/posting/Posting.tsx b/src/pages/posting/Posting.tsx index 4270932e..7512a5ed 100644 --- a/src/pages/posting/Posting.tsx +++ b/src/pages/posting/Posting.tsx @@ -34,7 +34,7 @@ const Posting = () => { if (location.state === null) { navigate('/404'); } - + console.log(location.state); setMeditationInfo(location.state); }, []); From 2709db6051bef81d34e342589e16f818d2bb1985 Mon Sep 17 00:00:00 2001 From: Suyeon Date: Mon, 25 Sep 2023 15:04:31 +0900 Subject: [PATCH 03/10] =?UTF-8?q?=F0=9F=9A=A8=20Fix:=20=EA=B1=B4=EB=84=88?= =?UTF-8?q?=EB=9B=B0=EA=B8=B0=20=ED=81=B4=EB=A6=AD=20=EB=AC=B8=EC=A0=9C=20?= =?UTF-8?q?-=20=EA=B1=B4=EB=84=88=EB=9B=B0=EA=B8=B0=20=ED=81=B4=EB=A6=AD?= =?UTF-8?q?=20=EC=8B=9C=20=ED=99=95=EC=9D=B8=EC=9D=84=20=EB=88=84=EB=A5=B4?= =?UTF-8?q?=EA=B8=B0=EB=8F=84=20=EC=A0=84=EC=97=90=20=ED=8F=AC=EC=8A=A4?= =?UTF-8?q?=ED=8C=85=20=EB=B0=9C=ED=96=89=20=EB=82=B4=EC=9A=A9=EC=9D=B4=20?= =?UTF-8?q?=EC=82=AD=EC=A0=9C=EB=90=98=EB=8A=94=20=EB=AC=B8=EC=A0=9C=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/posting/components/SkipPosting/SkipPosting.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/posting/components/SkipPosting/SkipPosting.tsx b/src/pages/posting/components/SkipPosting/SkipPosting.tsx index a85fbf30..fc261162 100644 --- a/src/pages/posting/components/SkipPosting/SkipPosting.tsx +++ b/src/pages/posting/components/SkipPosting/SkipPosting.tsx @@ -19,7 +19,6 @@ const SkipPosting = ({ channelId, customToken }: SkipPostingProps) => { const handleClickSkipPost = () => { setShowConfirm(true); - sessionStorage.removeItem('posting'); }; const handleCancelButton = () => { @@ -29,6 +28,7 @@ const SkipPosting = ({ channelId, customToken }: SkipPostingProps) => { const handleConfirmButton = async () => { const formData = createFormData('', channelId); await postCreateNewPost(customToken, formData).then(() => { + sessionStorage.removeItem('posting'); navigate('/posts'); }); }; From f706c5067af831dec84071fcb056470b9dbef1e5 Mon Sep 17 00:00:00 2001 From: Suyeon Date: Mon, 25 Sep 2023 15:38:13 +0900 Subject: [PATCH 04/10] =?UTF-8?q?=F0=9F=92=84=20Style:=20height=20style=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/NotFound/NotFound.tsx | 9 +-------- src/pages/posting/Posting.style.ts | 17 +++++++---------- .../posting/components/NewPost/NewPost.style.ts | 4 +++- .../components/SkipPosting/SkipPosting.style.ts | 4 ++-- 4 files changed, 13 insertions(+), 21 deletions(-) diff --git a/src/pages/NotFound/NotFound.tsx b/src/pages/NotFound/NotFound.tsx index 894398cc..1a6bd591 100644 --- a/src/pages/NotFound/NotFound.tsx +++ b/src/pages/NotFound/NotFound.tsx @@ -7,15 +7,8 @@ import { ContentContainer, NavButtonContainer } from '@components/Alert/Alert.style'; -import useSessionStorage from '@hooks/useSessionStorage'; const NotFound = () => { - const [user] = useSessionStorage('userData', { - _id: '', - token: '' - }); - const redirectPage = user.token === '' ? '/' : '/posts'; - return ( { {'404! 잘못된 페이지 접근이에요!'} - +