From 6f807930f61b58f6d0c0d7e797cacee362e7cd58 Mon Sep 17 00:00:00 2001 From: sean-brydon <55134778+sean-brydon@users.noreply.github.com> Date: Tue, 13 Sep 2022 21:13:24 +0100 Subject: [PATCH] Tidy up settings calendars (#4430) --- .../components/v2/settings/CalendarSwitch.tsx | 2 +- .../v2/settings/my-account/calendars.tsx | 50 +++++++++++-------- .../integrations/DisconnectIntegration.tsx | 12 +++-- 3 files changed, 40 insertions(+), 24 deletions(-) diff --git a/apps/web/components/v2/settings/CalendarSwitch.tsx b/apps/web/components/v2/settings/CalendarSwitch.tsx index 73eadd384e..5cf5f1a32a 100644 --- a/apps/web/components/v2/settings/CalendarSwitch.tsx +++ b/apps/web/components/v2/settings/CalendarSwitch.tsx @@ -76,7 +76,7 @@ export function CalendarSwitch(props: { /> {props.defaultSelected && ( - {t("adding_events_to")} + {t("adding_events_to")} )} diff --git a/apps/web/pages/v2/settings/my-account/calendars.tsx b/apps/web/pages/v2/settings/my-account/calendars.tsx index 4c1cf8582f..d9b37cd431 100644 --- a/apps/web/pages/v2/settings/my-account/calendars.tsx +++ b/apps/web/pages/v2/settings/my-account/calendars.tsx @@ -38,32 +38,38 @@ const CalendarsView = () => { { - console.log("🚀 ~ file: calendars.tsx ~ line 28 ~ CalendarsView ~ data", data); return data.connectedCalendars.length ? (
-
-
- +
+
+ +
+ +
+
+

+ {t("add_to_calendar")} +

+

+ + Where to add events when you re booked. You can override this on a per-event basis in + advanced settings in the event type. + +

+
+
-

{t("add_to_calendar")}

-

- - Where to add events when you re booked. You can override this on a per-event basis in - advanced settings in the event type. - -

-
-

+

{t("check_for_conflicts")}

-

{t("select_calendars")}

+

{t("select_calendars")}

{data.connectedCalendars.map((item) => ( @@ -92,7 +98,11 @@ const CalendarsView = () => { {item.integration.description}
- +
diff --git a/packages/ui/v2/modules/integrations/DisconnectIntegration.tsx b/packages/ui/v2/modules/integrations/DisconnectIntegration.tsx index 52f76bbb59..88a23d247e 100644 --- a/packages/ui/v2/modules/integrations/DisconnectIntegration.tsx +++ b/packages/ui/v2/modules/integrations/DisconnectIntegration.tsx @@ -3,7 +3,7 @@ import { useState } from "react"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { trpc } from "@calcom/trpc/react"; import { Icon } from "@calcom/ui"; -import { Button } from "@calcom/ui/v2/core/Button"; +import { Button, ButtonProps } from "@calcom/ui/v2/core/Button"; import { Dialog, DialogTrigger, DialogContent } from "@calcom/ui/v2/core/Dialog"; import showToast from "@calcom/ui/v2/core/notifications"; @@ -12,11 +12,13 @@ export default function DisconnectIntegration({ label, trashIcon, isGlobal, + buttonProps, }: { credentialId: number; - label: string; + label?: string; trashIcon?: boolean; isGlobal?: boolean; + buttonProps?: ButtonProps; }) { const { t } = useLocale(); const [modalOpen, setModalOpen] = useState(false); @@ -36,7 +38,11 @@ export default function DisconnectIntegration({ <> -