From afb8ce7109376268f338cfaa5acfc98d7de8c914 Mon Sep 17 00:00:00 2001 From: Alex van Andel Date: Thu, 19 Aug 2021 13:36:17 +0100 Subject: [PATCH] Fixes #494: TimeOptions 24h clock toggle broken (#495) --- components/booking/TimeOptions.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/components/booking/TimeOptions.tsx b/components/booking/TimeOptions.tsx index 4e29bbf1db..d3ee31ab99 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) => {