From 3f823097f249ab21c4e4e40d2ac2570841c7a3b4 Mon Sep 17 00:00:00 2001 From: iOdiO89 <117376841+iOdiO89@users.noreply.github.com> Date: Mon, 1 Jul 2024 18:07:36 +0900 Subject: [PATCH] =?UTF-8?q?FIX:=20StaffTimeInput=EC=9D=98=20setIsFocused?= =?UTF-8?q?=20-=20optional=20props=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules | 2 +- src/screen/manage/StaffTimeInput.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules b/modules index 4a3f855..a629840 160000 --- a/modules +++ b/modules @@ -1 +1 @@ -Subproject commit 4a3f855642005d44bdc2732e8bffdce75dec8a96 +Subproject commit a629840a7ca0aaed6a29e9cc67b42fa23d68f9ac diff --git a/src/screen/manage/StaffTimeInput.tsx b/src/screen/manage/StaffTimeInput.tsx index 0a8d201..4a319d6 100644 --- a/src/screen/manage/StaffTimeInput.tsx +++ b/src/screen/manage/StaffTimeInput.tsx @@ -8,7 +8,7 @@ interface StaffTimeProps { setStartTime: React.Dispatch>; endTime: string; setEndTime: React.Dispatch>; - setIsFocused: React.Dispatch>; + setIsFocused?: React.Dispatch>; } export default function StaffTimeInput({ @@ -23,7 +23,7 @@ export default function StaffTimeInput({ const [isFocused2, setIsFocused2] = useState(false); useEffect(() => { - if (isFocused1 || isFocused2) setIsFocused(true); + if (setIsFocused && (isFocused1 || isFocused2)) setIsFocused(true); else if (setIsFocused !== undefined) setIsFocused(false); }, [isFocused1, isFocused2]);