From d06b529554d8bce271009851eab9d2ec1669f8ab Mon Sep 17 00:00:00 2001 From: junkue20 Date: Sun, 28 Jan 2024 15:12:08 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=A6=20chore=20:=20console.log=20?= =?UTF-8?q?=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/searchBtmSheets/calendar/index.tsx | 22 +------------------ .../common/searchBtmSheets/customer/index.tsx | 13 +---------- .../common/searchBtmSheets/region/index.tsx | 13 +---------- .../common/searchBtmSheets/room/index.tsx | 13 +---------- 4 files changed, 4 insertions(+), 57 deletions(-) diff --git a/components/common/searchBtmSheets/calendar/index.tsx b/components/common/searchBtmSheets/calendar/index.tsx index 15df7a54..a2378300 100644 --- a/components/common/searchBtmSheets/calendar/index.tsx +++ b/components/common/searchBtmSheets/calendar/index.tsx @@ -1,5 +1,5 @@ 'use client'; -import React, { useEffect } from 'react'; +import React from 'react'; import { useRecoilState } from 'recoil'; import { SEARCH_DEFAULT } from '@/constants/search-detail'; import BottomSheets from '@/components/common/bottomSheets'; @@ -21,26 +21,6 @@ const CalendarBottomSheet = ({ useRecoilState(isAllDayCheckedState); const [range] = useRecoilState(rangeDate); - useEffect(() => { - const debounce = setTimeout(() => { - if (range && range.from && range.to) - // fetch(range.from) 등등 api에 사용 예정 - console.log( - '디바운스된 날짜 :', - format(range.from, 'yyyy-MM-dd', { - locale: ko, - }), - format(range.to, 'yyyy-MM-dd', { - locale: ko, - }), - ); - }, 500); - - return () => { - clearTimeout(debounce); - }; - }, [range]); - const handleDateSelectAll = () => { setIsCalendarChecked(!isCalendarChecked); }; diff --git a/components/common/searchBtmSheets/customer/index.tsx b/components/common/searchBtmSheets/customer/index.tsx index 19106b08..eec29f31 100644 --- a/components/common/searchBtmSheets/customer/index.tsx +++ b/components/common/searchBtmSheets/customer/index.tsx @@ -1,5 +1,5 @@ 'use client'; -import React, { useEffect } from 'react'; +import React from 'react'; import { adultCountState, childCountState, @@ -17,17 +17,6 @@ const CustomerBottomSheet = ({ const [adultCount] = useRecoilState(adultCountState); const [childCount] = useRecoilState(childCountState); - useEffect(() => { - const debounce = setTimeout(() => { - // fetch(adultCount,childCount) 등등 api에 사용 예정 - console.log('디바운스된 성인, 아동 수 :', adultCount, ', ', childCount); - }, 500); - - return () => { - clearTimeout(debounce); - }; - }, [adultCount, childCount]); - return ( <> {SEARCH_DEFAULT.props.map((prop, index) => { diff --git a/components/common/searchBtmSheets/region/index.tsx b/components/common/searchBtmSheets/region/index.tsx index d490e347..cbc8cbf3 100644 --- a/components/common/searchBtmSheets/region/index.tsx +++ b/components/common/searchBtmSheets/region/index.tsx @@ -1,5 +1,5 @@ 'use client'; -import React, { useEffect } from 'react'; +import React from 'react'; import BottomSheets from '@/components/common/bottomSheets'; import CheckBoxComponent from '@/components/common/checkBox'; import { REGION_NAMES, SEARCH_DEFAULT } from '@/constants/search-detail'; @@ -28,17 +28,6 @@ const RegionBottomSheet = ({ const [regionBtnBlArr, setRegionBtnBlArr] = useRecoilState(regionBooleanIndex); - useEffect(() => { - const debounce = setTimeout(() => { - // fetch(regionBtnIdx) 등등 api에 사용 예정 - console.log('디바운스된 지역들 :', regionBtnIdx); - }, 500); - - return () => { - clearTimeout(debounce); - }; - }, [regionBtnIdx]); - const handleRegionSelectAll = () => { setIsRegionChecked(!isRegionChecked); const allIndexes = Array.from( diff --git a/components/common/searchBtmSheets/room/index.tsx b/components/common/searchBtmSheets/room/index.tsx index a2cae147..c3933e30 100644 --- a/components/common/searchBtmSheets/room/index.tsx +++ b/components/common/searchBtmSheets/room/index.tsx @@ -1,5 +1,5 @@ 'use client'; -import React, { useEffect } from 'react'; +import React from 'react'; import { ROOM_CATEGORIES, SEARCH_DEFAULT } from '@/constants/search-detail'; import BottomSheets from '@/components/common/bottomSheets'; import CheckBoxComponent from '@/components/common/checkBox'; @@ -21,17 +21,6 @@ const RoomBottomSheet = ({ const [isRoomBtnSelected, setIsRoomBtnSelected] = useRecoilState(roomBooleanIndex); - useEffect(() => { - const debounce = setTimeout(() => { - // fetch(roomBtnIdx) 등등 api에 사용 예정 - console.log('디바운스된 숙소유형 :', roomBtnIdx); - }, 500); - - return () => { - clearTimeout(debounce); - }; - }, [roomBtnIdx]); - const handleRoomSelectAll = () => { setIsRoomChecked(!isRoomChecked); const allIndexes = Array.from(