Skip to content

Commit

Permalink
๐Ÿ“ฆ chore : console.log ์‚ญ์ œ
Browse files Browse the repository at this point in the history
  • Loading branch information
junkue20 committed Jan 28, 2024
1 parent 12251a7 commit d06b529
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 57 deletions.
22 changes: 1 addition & 21 deletions components/common/searchBtmSheets/calendar/index.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -21,26 +21,6 @@ const CalendarBottomSheet = ({
useRecoilState<boolean>(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);
};
Expand Down
13 changes: 1 addition & 12 deletions components/common/searchBtmSheets/customer/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use client';
import React, { useEffect } from 'react';
import React from 'react';
import {
adultCountState,
childCountState,
Expand All @@ -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) => {
Expand Down
13 changes: 1 addition & 12 deletions components/common/searchBtmSheets/region/index.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -28,17 +28,6 @@ const RegionBottomSheet = ({
const [regionBtnBlArr, setRegionBtnBlArr] =
useRecoilState<boolean[]>(regionBooleanIndex);

useEffect(() => {
const debounce = setTimeout(() => {
// fetch(regionBtnIdx) ๋“ฑ๋“ฑ api์— ์‚ฌ์šฉ ์˜ˆ์ •
console.log('๋””๋ฐ”์šด์Šค๋œ ์ง€์—ญ๋“ค :', regionBtnIdx);
}, 500);

return () => {
clearTimeout(debounce);
};
}, [regionBtnIdx]);

const handleRegionSelectAll = () => {
setIsRegionChecked(!isRegionChecked);
const allIndexes = Array.from(
Expand Down
13 changes: 1 addition & 12 deletions components/common/searchBtmSheets/room/index.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -21,17 +21,6 @@ const RoomBottomSheet = ({
const [isRoomBtnSelected, setIsRoomBtnSelected] =
useRecoilState<boolean[]>(roomBooleanIndex);

useEffect(() => {
const debounce = setTimeout(() => {
// fetch(roomBtnIdx) ๋“ฑ๋“ฑ api์— ์‚ฌ์šฉ ์˜ˆ์ •
console.log('๋””๋ฐ”์šด์Šค๋œ ์ˆ™์†Œ์œ ํ˜• :', roomBtnIdx);
}, 500);

return () => {
clearTimeout(debounce);
};
}, [roomBtnIdx]);

const handleRoomSelectAll = () => {
setIsRoomChecked(!isRoomChecked);
const allIndexes = Array.from(
Expand Down

0 comments on commit d06b529

Please sign in to comment.