mirror of
https://github.com/hanzoai/calendar.git
synced 2026-10-30 14:46:43 +00:00
* add dry run prop for mocking actual behaviour without actual api calls * fix e2e tests * fixup * remove await present twice * fix: adjust success toast for apple connect dry run Co-Authored-By: [email protected] <[email protected]> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: [email protected] <[email protected]>
44 lines
1.1 KiB
TypeScript
44 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,
|
|
isDryRun,
|
|
}) => {
|
|
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}
|
|
isDryRun={isDryRun}
|
|
/>
|
|
);
|
|
};
|