From d65d09e82d3c86a1ce2fef2240deee820ae0c3d1 Mon Sep 17 00:00:00 2001 From: CHOI GIHOAWN Date: Mon, 23 Sep 2024 13:49:40 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=8B=9D=EB=AC=BC=20=EB=AC=BC=EC=A3=BC?= =?UTF-8?q?=EA=B8=B0,=20=EB=B9=84=EB=A3=8C=EC=A3=BC=EA=B8=B0=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80=20=EB=B0=94=ED=85=80=20=EC=8B=9C=ED=8A=B8=20=EC=98=A4?= =?UTF-8?q?=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/LoadingSpinner.tsx | 2 +- src/components/addPlant/NotificationToggle.tsx | 2 +- src/components/addPlant/NotificationToggleList.tsx | 3 +++ src/components/addPlant/PlantTypeTextField.tsx | 1 + src/components/common/CenterBottomSheet/index.tsx | 12 +++++++++--- 5 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/components/LoadingSpinner.tsx b/src/components/LoadingSpinner.tsx index 290e043..9dd9ee2 100644 --- a/src/components/LoadingSpinner.tsx +++ b/src/components/LoadingSpinner.tsx @@ -9,7 +9,7 @@ const LoadingSpinner = ({ transparent }: LoadingSpinnerProps) => { return ( diff --git a/src/components/addPlant/NotificationToggle.tsx b/src/components/addPlant/NotificationToggle.tsx index fefea2e..f6e7c78 100644 --- a/src/components/addPlant/NotificationToggle.tsx +++ b/src/components/addPlant/NotificationToggle.tsx @@ -93,7 +93,7 @@ const NotificationToggle = ({ { onSelect?.(selected); - onClose(); + setIsOpen(false); }} text={'선택하기'} className={'bg-BloomingGreen500 text-white'} diff --git a/src/components/addPlant/NotificationToggleList.tsx b/src/components/addPlant/NotificationToggleList.tsx index 55669a2..e20d0ff 100644 --- a/src/components/addPlant/NotificationToggleList.tsx +++ b/src/components/addPlant/NotificationToggleList.tsx @@ -53,6 +53,9 @@ const NotificationToggleList = ({ }; const handleBottomSheetClose = (type: 'water' | 'fertilizer') => { + console.log('type', type); + console.log('water', water.period); + console.log('fertilizer', fertilizer.period); switch (type) { case 'water': if (!water.period) { diff --git a/src/components/addPlant/PlantTypeTextField.tsx b/src/components/addPlant/PlantTypeTextField.tsx index eb8798e..154739f 100644 --- a/src/components/addPlant/PlantTypeTextField.tsx +++ b/src/components/addPlant/PlantTypeTextField.tsx @@ -22,6 +22,7 @@ const PlantTypeTextField = () => { icon={} value={plantType ?? ''} onMouseDown={onMouseDown} + readOnly={true} /> {open && (
diff --git a/src/components/common/CenterBottomSheet/index.tsx b/src/components/common/CenterBottomSheet/index.tsx index b109189..8764ef2 100644 --- a/src/components/common/CenterBottomSheet/index.tsx +++ b/src/components/common/CenterBottomSheet/index.tsx @@ -1,6 +1,12 @@ import { ReactNode } from 'react'; import { cn } from '@/utils.ts'; -import { Dialog, DialogContent, DialogDescription, DialogFooter } from '@/components/ui/dialog.tsx'; +import { + Dialog, + DialogContent, + DialogDescription, + DialogFooter, + DialogTitle, +} from '@/components/ui/dialog.tsx'; interface CenterBottomSheetProps { title: string | ReactNode; @@ -27,7 +33,7 @@ const CenterBottomSheet = ({
-
{title} -
+ {content}