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]);