Files
calendar/packages/platform/atoms/connect/google/GcalConnect.tsx
T
Rajiv SahalandGitHub 1d203dc566 feat: frontend to handle multiple calendars for connect atoms (#16527)
* handle multiple calendars in connect atoms

* resolve merge conflicts

* fixup

* frontend for multiple calendars

* fixup

* remove comment

* add missing props

* add prop for multi calendar view

* add multi calendar support

* fixup
2024-09-30 11:33:18 +00:00

42 lines
1.1 KiB
TypeScript

"use client";
import type { FC } from "react";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { GOOGLE_CALENDAR } from "@calcom/platform-constants";
import type { OAuthConnectProps } from "../OAuthConnect";
import { OAuthConnect } from "../OAuthConnect";
export const GcalConnect: FC<Partial<OAuthConnectProps>> = ({
label,
alreadyConnectedLabel,
loadingLabel,
className,
onCheckError,
redir,
initialData,
isMultiCalendar = false,
tooltipSide,
tooltip,
isClickable,
}) => {
const { t } = useLocale();
return (
<OAuthConnect
label={label || t("google_connect_atom_label")}
alreadyConnectedLabel={alreadyConnectedLabel || t("google_connect_atom_already_connected_label")}
loadingLabel={loadingLabel || t("google_connect_atom_loading_label")}
calendar={GOOGLE_CALENDAR}
className={className}
onCheckError={onCheckError}
redir={redir}
initialData={initialData}
isMultiCalendar={isMultiCalendar}
tooltipSide={tooltipSide}
tooltip={tooltip}
isClickable={isClickable}
/>
);
};