From 6f755b8f07a969a7cf79c6f5b33842eceafdaa0f Mon Sep 17 00:00:00 2001 From: ysCha Date: Mon, 9 Jun 2025 17:07:51 +0900 Subject: [PATCH] =?UTF-8?q?=EB=AC=BC=EA=B1=B4=EC=A0=95=EB=B3=B4=EC=97=90?= =?UTF-8?q?=EC=84=9C=20=EC=A0=80=EC=9E=A5=EC=9D=B4=ED=9B=84=20=EA=B7=B8?= =?UTF-8?q?=EB=A6=BC=EC=9C=BC=EB=A1=9C=20=ED=81=B4=EB=A6=AD=EC=8B=9C=20?= =?UTF-8?q?=EC=97=90=EB=9F=AC=EB=B0=9C=EC=83=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/management/StuffSubHeader.jsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/components/management/StuffSubHeader.jsx b/src/components/management/StuffSubHeader.jsx index fccafbdc..6cbfd862 100644 --- a/src/components/management/StuffSubHeader.jsx +++ b/src/components/management/StuffSubHeader.jsx @@ -56,19 +56,20 @@ export default function StuffSubHeader({ type }) { */ const moveFloorPlan = () => { setFloorPlanObjectNo({ floorPlanObjectNo: objectNo }) + const param = { - pid: managementState?.planList?.length === 0 ? '1' : managementState?.planList[0].planNo, + pid: managementState?.planList?.length > 0 ? managementState?.planList[0].planNo : '1', objectNo: objectNo, } - if (managementState?.planList?.length === 0) { - setSelectedMenu('surface') - } else { + if (managementState?.planList?.length > 0) { if (managementState?.planList[0].estimateDate) { setSelectedMenu('module') } else { setSelectedMenu('surface') } + } else { + setSelectedMenu('surface') } const url = `/floor-plan?${queryStringFormatter(param)}`