fix: Able to toggle off timeFormat on new booker UI (#9442)

Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
This commit is contained in:
Rob Jackson
2023-06-10 07:51:49 +00:00
committed by GitHub
co-authored by Udit Takkar
parent 0d01d3246a
commit 5b47844fa1
@@ -12,7 +12,7 @@ export const TimeFormatToggle = () => {
return (
<ToggleGroup
onValueChange={(newFormat) => {
if (newFormat !== timeFormat) setTimeFormat(newFormat as TimeFormat);
if (newFormat && newFormat !== timeFormat) setTimeFormat(newFormat as TimeFormat);
}}
defaultValue={timeFormat}
value={timeFormat}