only show invite link for app.cal.dev (#2807)
Co-authored-by: CarinaWolli <[email protected]> Co-authored-by: Omar López <[email protected]>
This commit is contained in:
2 files changed
+16
-10
No files matched your search
@@ -33,6 +33,7 @@ export default function ZapierSetup(props: IZapierSetupProps) {
|
||||
);
|
||||
const [credentialId] = zapierCredentials?.credentialIds || [false];
|
||||
const showContent = integrations.data && integrations.isSuccess && credentialId;
|
||||
const isCalDev = process.env.NEXT_PUBLIC_WEBAPP_URL === "https://app.cal.dev";
|
||||
|
||||
async function createApiKey() {
|
||||
const event = { note: "Zapier", expiresAt: null, appId: ZAPIER };
|
||||
@@ -48,7 +49,7 @@ export default function ZapierSetup(props: IZapierSetupProps) {
|
||||
|
||||
if (integrations.isLoading) {
|
||||
return (
|
||||
<div className="absolute z-50 flex h-screen w-full items-center bg-gray-200">
|
||||
<div className="absolute z-50 flex items-center w-full h-screen bg-gray-200">
|
||||
<Loader />
|
||||
</div>
|
||||
);
|
||||
@@ -57,7 +58,7 @@ export default function ZapierSetup(props: IZapierSetupProps) {
|
||||
return (
|
||||
<div className="flex h-screen bg-gray-200">
|
||||
{showContent ? (
|
||||
<div className="m-auto rounded bg-white p-10">
|
||||
<div className="p-10 m-auto bg-white rounded">
|
||||
<div className="flex flex-row">
|
||||
<div className="mr-5">
|
||||
<Icon />
|
||||
@@ -74,8 +75,8 @@ export default function ZapierSetup(props: IZapierSetupProps) {
|
||||
) : (
|
||||
<>
|
||||
<div className="mt-1 text-xl">{t("your_unique_api_key")}</div>
|
||||
<div className="my-2 mt-3 flex">
|
||||
<div className="mr-1 w-full rounded bg-gray-100 p-3 pr-5">{newApiKey}</div>
|
||||
<div className="flex my-2 mt-3">
|
||||
<div className="w-full p-3 pr-5 mr-1 bg-gray-100 rounded">{newApiKey}</div>
|
||||
<Tooltip content="copy to clipboard">
|
||||
<Button
|
||||
onClick={() => {
|
||||
@@ -84,7 +85,7 @@ export default function ZapierSetup(props: IZapierSetupProps) {
|
||||
}}
|
||||
type="button"
|
||||
className="px-4 text-base ">
|
||||
<ClipboardCopyIcon className="mr-2 h-5 w-5 text-neutral-100" />
|
||||
<ClipboardCopyIcon className="w-5 h-5 mr-2 text-neutral-100" />
|
||||
{t("copy")}
|
||||
</Button>
|
||||
</Tooltip>
|
||||
@@ -96,13 +97,16 @@ export default function ZapierSetup(props: IZapierSetupProps) {
|
||||
)}
|
||||
|
||||
<ol className="mt-5 mb-5 ml-5 mr-5 list-decimal">
|
||||
<Trans i18nKey="zapier_setup_instructions">
|
||||
{isCalDev && (
|
||||
<li>
|
||||
Go to:
|
||||
{t("go_to")}
|
||||
<a href={props.inviteLink} className="text-orange-600 underline">
|
||||
Zapier Invite Link
|
||||
{t("zapier_invite_link")}
|
||||
</a>
|
||||
</li>
|
||||
)
|
||||
}
|
||||
<Trans i18nKey="zapier_setup_instructions">
|
||||
<li>Log into your Zapier account and create a new Zap.</li>
|
||||
<li>Select Cal.com as your Trigger app. Also choose a Trigger event.</li>
|
||||
<li>Choose your account and then enter your Unique API Key.</li>
|
||||
|
||||
Reference in new issue
Block a user