diff --git a/components/booking/TimeOptions.tsx b/components/booking/TimeOptions.tsx index 4e29bbf1..d3ee31ab 100644 --- a/components/booking/TimeOptions.tsx +++ b/components/booking/TimeOptions.tsx @@ -19,9 +19,10 @@ const TimeOptions = (props) => { } }, [selectedTimeZone]); - useEffect(() => { + const handle24hClockToggle = (is24hClock: boolean) => { + setIs24hClock(is24hClock); props.onToggle24hClock(is24h(is24hClock)); - }, [is24hClock]); + }; return ( selectedTimeZone !== "" && ( @@ -35,7 +36,7 @@ const TimeOptions = (props) => {