From c96f6e5e19de8f0207bd9e2a10af298ec729f022 Mon Sep 17 00:00:00 2001 From: hun Date: Thu, 12 Feb 2026 18:41:07 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=8A=A4=ED=81=AC=EB=A1=A4=20=EC=98=81?= =?UTF-8?q?=EC=97=AD=EC=9C=BC=EB=A1=9C=20=EC=9D=B8=ED=95=9C=20=EB=B0=80?= =?UTF-8?q?=EB=A6=BC=20=ED=98=84=EC=83=81=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/useAddToCombination.ts | 8 ++++++-- src/pages/devices/DeviceSearchPage.tsx | 7 ------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/hooks/useAddToCombination.ts b/src/hooks/useAddToCombination.ts index 995cb6d..1efc1f5 100644 --- a/src/hooks/useAddToCombination.ts +++ b/src/hooks/useAddToCombination.ts @@ -60,8 +60,12 @@ export const useAddToCombination = ({ }; // 에러 핸들러 (공통) - const handleComboError = (error: unknown) => { - console.error('기기 추가 실패:', error); + const handleComboError = (error: any) => { + console.error('기기 추가 실패 상세 정보:', error.response?.data || error.message); + if (error.response?.data) { + console.log('Error Code:', error.response.data.errorCode || error.response.data.code); + console.log('Error Message:', error.response.data.message); + } }; /* 내 조합에 담기 */ diff --git a/src/pages/devices/DeviceSearchPage.tsx b/src/pages/devices/DeviceSearchPage.tsx index 4476869..970eb7d 100644 --- a/src/pages/devices/DeviceSearchPage.tsx +++ b/src/pages/devices/DeviceSearchPage.tsx @@ -54,20 +54,13 @@ const DeviceSearchPage = () => { useEffect(() => { if (isModalOpen) { - const scrollBarWidth = window.innerWidth - document.documentElement.clientWidth; document.documentElement.style.overflow = 'hidden'; - document.body.style.overflow = 'hidden'; - document.body.style.paddingRight = `${scrollBarWidth}px`; } else { document.documentElement.style.overflow = ''; - document.body.style.overflow = ''; - document.body.style.paddingRight = ''; } return () => { document.documentElement.style.overflow = ''; - document.body.style.overflow = ''; - document.body.style.paddingRight = ''; }; }, [isModalOpen]);