From 0c23c54bd32b8d02b52059139ee73bb7a1d84446 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=ED=9A=A8=EC=9B=90?= Date: Sun, 10 Mar 2024 16:20:29 +0900 Subject: [PATCH 1/4] =?UTF-8?q?[Fix/#116]:=20id=20=EA=B0=92=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD=EC=8B=9C=20dateList=20=EA=B0=B1=EC=8B=A0=EB=90=98?= =?UTF-8?q?=EC=A7=80=20=EC=95=8A=EB=8A=94=20=EC=9D=B4=EC=8A=88=20=ED=95=B4?= =?UTF-8?q?=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/TestDetailPage.tsx | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/src/pages/TestDetailPage.tsx b/src/pages/TestDetailPage.tsx index 73902f0..c0d1157 100644 --- a/src/pages/TestDetailPage.tsx +++ b/src/pages/TestDetailPage.tsx @@ -123,20 +123,18 @@ const TestDetailPage = () => { // 메뉴탭 이동시 id 변경 // 첫번째 날짜값으로 조회 React.useEffect(() => { - if (!testDate) { - getTestDateList(Number(id)).then((res) => { - setDateList(res.data.data); - if (res.data.data.length > 0) { - const { year, month, day } = res.data.data[0]; - console.log('탭이동', year, month, day); - setSelectedDate(`${year}-${month}-${day}`); - getTestDetail(Number(id), year, month, day).then((res) => { - console.log(res.data.data); - setTestData(res.data.data); - }); - } - }); - } + getTestDateList(Number(id)).then((res) => { + setDateList(res.data.data); + if (res.data.data.length > 0) { + const { year, month, day } = res.data.data[0]; + console.log('탭이동', year, month, day); + setSelectedDate(`${year}-${month}-${day}`); + getTestDetail(Number(id), year, month, day).then((res) => { + console.log(res.data.data); + setTestData(res.data.data); + }); + } + }); }, [id]); // id는 고정인채 날짜만 변경시 From e6c2d9a9f61e9900f8eed1c53ce0be7a38db6fbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=ED=9A=A8=EC=9B=90?= Date: Sun, 10 Mar 2024 16:23:16 +0900 Subject: [PATCH 2/4] =?UTF-8?q?[Fix/#116]:=20=EA=B5=90=EC=B2=B4=EA=B0=80?= =?UTF-8?q?=20=ED=95=84=EC=9A=94=ED=95=9C=20=EB=B6=80=ED=92=88=202?= =?UTF-8?q?=EC=9C=84=EA=B9=8C=EC=A7=80=20=EC=95=84=EC=9D=B4=EC=BD=98=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/TestDetailPage.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/TestDetailPage.tsx b/src/pages/TestDetailPage.tsx index c0d1157..d1b059b 100644 --- a/src/pages/TestDetailPage.tsx +++ b/src/pages/TestDetailPage.tsx @@ -327,12 +327,12 @@ const TestDetailPage = () => { - {testData?.warningList.map((item) => ( + {testData?.warningList.map((item, index) => ( ))} From 5ccf57bdcbb9141a215ab85228d305df88a355a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=ED=9A=A8=EC=9B=90?= Date: Sun, 10 Mar 2024 17:08:27 +0900 Subject: [PATCH 3/4] =?UTF-8?q?[Fix/#16]:=20=EA=B2=AC=EC=A0=81=EC=84=9C=20?= =?UTF-8?q?=EC=9D=B4=EB=8F=99=EC=8B=9C=20id=20null=20=EA=B0=92=20=EC=98=A4?= =?UTF-8?q?=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/dashboard/ResultRecord.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/dashboard/ResultRecord.tsx b/src/components/dashboard/ResultRecord.tsx index 4e71a80..3de2a88 100644 --- a/src/components/dashboard/ResultRecord.tsx +++ b/src/components/dashboard/ResultRecord.tsx @@ -69,7 +69,7 @@ function ResultRecord({ droneId, data }: ResultRecordProp) { buttonType='accentLight' onClick={(e) => { e.stopPropagation(); - goToDashboard(location.state); // data.id 필요 + goToDashboard(droneId); // data.id 필요 }} style={{ width: '95px', height: '32px', fontSize: '14px' }} /> From 7d903c30d836e66e7210121eecd5761f9672dbaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=ED=9A=A8=EC=9B=90?= Date: Sun, 10 Mar 2024 17:10:10 +0900 Subject: [PATCH 4/4] =?UTF-8?q?[Fix/#116]:=20=EB=A9=94=EB=89=B4=ED=83=AD?= =?UTF-8?q?=202=EA=B0=9C=20=EC=9D=B4=EC=83=81=20=EC=84=A0=ED=83=9D?= =?UTF-8?q?=EB=90=98=EB=8A=94=20=EC=9D=B4=EC=8A=88=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/common/MenuTab.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/common/MenuTab.tsx b/src/components/common/MenuTab.tsx index 4d7fec7..ba1f3a8 100644 --- a/src/components/common/MenuTab.tsx +++ b/src/components/common/MenuTab.tsx @@ -198,7 +198,7 @@ const MenuTab = ({ groups, drones, type }: MenuTabProps) => { {drones?.map((item) => ( handleTabMenu(