Skip to content

Commit

Permalink
Merge pull request #96 from iOdiO89/develop
Browse files Browse the repository at this point in the history
FIX: StaffTImeInput의 SetIsFocused - Optional props로 변경
  • Loading branch information
DeveloperRyou authored Jul 1, 2024
2 parents 106ef37 + 3f82309 commit a52de81
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion modules
4 changes: 2 additions & 2 deletions src/screen/manage/StaffTimeInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interface StaffTimeProps {
setStartTime: React.Dispatch<React.SetStateAction<string>>;
endTime: string;
setEndTime: React.Dispatch<React.SetStateAction<string>>;
setIsFocused: React.Dispatch<React.SetStateAction<boolean>>;
setIsFocused?: React.Dispatch<React.SetStateAction<boolean>>;
}

export default function StaffTimeInput({
Expand All @@ -23,7 +23,7 @@ export default function StaffTimeInput({
const [isFocused2, setIsFocused2] = useState<boolean>(false);

useEffect(() => {
if (isFocused1 || isFocused2) setIsFocused(true);
if (setIsFocused && (isFocused1 || isFocused2)) setIsFocused(true);
else if (setIsFocused !== undefined) setIsFocused(false);
}, [isFocused1, isFocused2]);

Expand Down

0 comments on commit a52de81

Please sign in to comment.