diff --git a/pages/[user]/[type].tsx b/pages/[user]/[type].tsx index 728694dab5..3e5a201d89 100644 --- a/pages/[user]/[type].tsx +++ b/pages/[user]/[type].tsx @@ -34,6 +34,10 @@ export default function Type(props) { const telemetry = useTelemetry(); const [selectedTimeZone, setSelectedTimeZone] = useState(''); + + function toggleTimeOptions() { + setIsTimeOptionsOpen(!isTimeOptionsOpen); + } useEffect(() => { // Setting timezone only client-side @@ -45,8 +49,6 @@ export default function Type(props) { const router = useRouter(); const { user } = router.query; - const toggleTimeOptions = () => { setIsTimeOptionsOpen(!isTimeOptionsOpen); } - // Handle month changes const incrementMonth = () => { setSelectedMonth(selectedMonth + 1); @@ -168,37 +170,46 @@ export default function Type(props) { {props.eventType.length} minutes

-

- - - - am/pm - - - Use setting - - - 24h - - -

-

- setSelectedTimeZone(value)} className="shadow-sm focus:ring-blue-500 focus:border-blue-500 mt-1 block w-full sm:text-sm border-gray-300 rounded-md" /> -

+ + {isTimeOptionsOpen && +
+
+
Time Options
+
+ + + am/pm + + + Use setting + + + 24h + + +
+
+ setSelectedTimeZone(value)} className="mb-2 shadow-sm focus:ring-blue-500 focus:border-blue-500 mt-1 block w-full sm:text-sm border-gray-300 rounded-md" /> +
+ }

{props.eventType.description}