From 5766d6f5f472c3322573bba03afa02296692db33 Mon Sep 17 00:00:00 2001 From: Jeroen Reumkens Date: Wed, 5 Oct 2022 15:11:26 +0200 Subject: [PATCH] Improve responsive layout of timezone select on booking page (#4839) * Improve responsive layout for timezone select on booking page. * Close TZ dropdown on booking page when it's hidden for mobile/desktop, this prevents having a dropdown menu floating around. Co-authored-by: Peer Richelsen --- apps/web/components/booking/TimeOptions.tsx | 2 +- .../booking/pages/AvailabilityPage.tsx | 33 +++++++++++-------- 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/apps/web/components/booking/TimeOptions.tsx b/apps/web/components/booking/TimeOptions.tsx index 57ca5cdd5e..8cda05f822 100644 --- a/apps/web/components/booking/TimeOptions.tsx +++ b/apps/web/components/booking/TimeOptions.tsx @@ -33,7 +33,7 @@ const TimeOptions: FC = ({ onToggle24hClock, onSelectTimeZone, timeFormat }; return selectedTimeZone !== "" ? ( -
+
{t("time_options")}
diff --git a/apps/web/components/booking/pages/AvailabilityPage.tsx b/apps/web/components/booking/pages/AvailabilityPage.tsx index 6267299791..e27ad60dc1 100644 --- a/apps/web/components/booking/pages/AvailabilityPage.tsx +++ b/apps/web/components/booking/pages/AvailabilityPage.tsx @@ -1,7 +1,7 @@ // Get router variables import { EventType } from "@prisma/client"; import { SchedulingType } from "@prisma/client"; -import * as Collapsible from "@radix-ui/react-collapsible"; +import * as Popover from "@radix-ui/react-popover"; import { TFunction } from "next-i18next"; import { useRouter } from "next/router"; import { useReducer, useEffect, useMemo, useState } from "react"; @@ -240,8 +240,8 @@ function TimezoneDropdown({ }; return ( - - + +

{timeZone} @@ -251,15 +251,20 @@ function TimezoneDropdown({ )}

-
- - - -
+ + + + + + + ); } @@ -416,7 +421,7 @@ const AvailabilityPage = ({ profile, eventType }: Props) => {

{eventType.title}

-
+
{eventType?.description && (
@@ -500,7 +505,7 @@ const AvailabilityPage = ({ profile, eventType }: Props) => {