Files
Rajiv SahalGitHubDevin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>[email protected] <[email protected]>
d66f983f56 feat: dry run behaviour for connect atoms (#20699)
* 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]>
2025-04-15 17:45:14 +00:00

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}
/>
);
};