From edfbd159f537617074666def4248a08444d710c4 Mon Sep 17 00:00:00 2001 From: kyu <2066apple@naver.com> Date: Sat, 16 Sep 2023 14:07:20 +0900 Subject: [PATCH 1/2] =?UTF-8?q?[=20fix=20]=20=EC=A7=84=ED=96=89=20?= =?UTF-8?q?=EC=98=88=EC=A0=95=20=EB=82=AB=ED=88=AC=EB=91=90=20=EC=88=98?= =?UTF-8?q?=EC=A0=95=20=ED=8E=98=EC=9D=B4=EC=A7=80=20=EC=9D=B4=EB=8F=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/nottodo/index.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/pages/nottodo/index.tsx b/src/pages/nottodo/index.tsx index e6db73e..531c545 100644 --- a/src/pages/nottodo/index.tsx +++ b/src/pages/nottodo/index.tsx @@ -74,9 +74,13 @@ export default function NotTodoPage() { setIsMenuOpen(true); }; - const handleMoveDetailPage = (nottodo: nottodoProps) => { + const handleMoveEditPage = (nottodo: nottodoProps) => { setCurrentNottodo(nottodo); - router(`/nottodo/edit/${nottodo.notToDoId}?state=complete`); + if (nottodo.progressState === 'COMPLETE') { + router(`/nottodo/edit/${nottodo.notToDoId}?state=complete`); + } else if (nottodo.progressState === 'BEFORE_START') { + router(`/nottodo/edit/${nottodo.notToDoId}`); + } }; return ( @@ -119,7 +123,7 @@ export default function NotTodoPage() { endDate={new Date(v.endDate)} goal={v.goal} openMenu={() => handleOpenMenu(v)} - onClick={v.progressState === 'COMPLETE' ? () => handleMoveDetailPage(v) : () => null} + onClick={() => handleMoveEditPage(v)} /> ))} {nottodoList.filter((v) => (progressState !== '' ? v.progressState === progressState : true)).length < 3 ? ( From 00f608297636eabc0f99f0ccd3f89822ab74fc64 Mon Sep 17 00:00:00 2001 From: kyu <2066apple@naver.com> Date: Sat, 16 Sep 2023 14:10:37 +0900 Subject: [PATCH 2/2] =?UTF-8?q?[=20fix=20]=20=EC=98=88=EC=A0=95=EC=9D=BC?= =?UTF-8?q?=EB=95=90=20=ED=86=A0=EC=8A=A4=ED=8A=B8=20=EB=9D=84=EC=9A=B0?= =?UTF-8?q?=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/nottodo/index.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pages/nottodo/index.tsx b/src/pages/nottodo/index.tsx index 531c545..f17a16e 100644 --- a/src/pages/nottodo/index.tsx +++ b/src/pages/nottodo/index.tsx @@ -7,7 +7,7 @@ import { Tabs } from '@/components/tab/Tabs'; import { Tab } from '@/components/tab/Tab'; import { BottomPopup } from '@/components/popup/BottomPopup'; import { DeleteTitlePopup } from '@/components/popup/PopupGroup'; -import { Toast as toast } from '@/components/toast/Toast'; +import { Toast, Toast as toast } from '@/components/toast/Toast'; import { deleteNottodo, getNottodoList, orderBy } from '@/api/nottodo'; import { ReactComponent as ArrowDown } from '@/assets/img/icn_arrow_down.svg'; @@ -74,12 +74,12 @@ export default function NotTodoPage() { setIsMenuOpen(true); }; - const handleMoveEditPage = (nottodo: nottodoProps) => { + const handleClickCard = (nottodo: nottodoProps) => { setCurrentNottodo(nottodo); if (nottodo.progressState === 'COMPLETE') { router(`/nottodo/edit/${nottodo.notToDoId}?state=complete`); } else if (nottodo.progressState === 'BEFORE_START') { - router(`/nottodo/edit/${nottodo.notToDoId}`); + Toast('도전일이 되면 열어볼 수 있어요'); } }; @@ -123,7 +123,7 @@ export default function NotTodoPage() { endDate={new Date(v.endDate)} goal={v.goal} openMenu={() => handleOpenMenu(v)} - onClick={() => handleMoveEditPage(v)} + onClick={() => handleClickCard(v)} /> ))} {nottodoList.filter((v) => (progressState !== '' ? v.progressState === progressState : true)).length < 3 ? (