From 0a2ddf05cab34e08c2f2c6c4e035498a9d69087e Mon Sep 17 00:00:00 2001 From: Dhairyashil Shinde <93669429+dhairyashiil@users.noreply.github.com> Date: Tue, 4 Nov 2025 01:57:43 +0530 Subject: [PATCH] refactor: remove cal ai banners (#24885) --- apps/web/public/cal-ai-banner.svg | 1 - apps/web/public/static/locales/en/common.json | 2 - packages/features/shell/CalAiBanner.tsx | 59 ------------------- packages/features/shell/Shell.tsx | 5 +- 4 files changed, 1 insertion(+), 66 deletions(-) delete mode 100644 apps/web/public/cal-ai-banner.svg delete mode 100644 packages/features/shell/CalAiBanner.tsx diff --git a/apps/web/public/cal-ai-banner.svg b/apps/web/public/cal-ai-banner.svg deleted file mode 100644 index 8c8ef9c931..0000000000 --- a/apps/web/public/cal-ai-banner.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/apps/web/public/static/locales/en/common.json b/apps/web/public/static/locales/en/common.json index 076b77c4f6..d4aad4d37e 100644 --- a/apps/web/public/static/locales/en/common.json +++ b/apps/web/public/static/locales/en/common.json @@ -836,8 +836,6 @@ "workflow_validation_failed": "Workflow validation failed", "workflow_validation_empty_fields": "One or more workflow steps have empty message content", "workflow_validation_unverified_contacts": "One or more phone numbers or email addresses are not verified", - "supercharge_your_workflows_with_cal_ai": "Supercharge your Workflows with Cal.ai", - "supercharge_your_workflows_with_cal_ai_description": "Lifelike AI agents that book meetings, send reminders, and follow up with your customers.", "phone_number_imported_successfully": "Phone number imported and linked to agent successfully", "phone_number_deleted_successfully": "Phone number deleted successfully", "delete_phone_number_confirmation": "Are you sure you want to delete this phone number? This action cannot be undone.", diff --git a/packages/features/shell/CalAiBanner.tsx b/packages/features/shell/CalAiBanner.tsx deleted file mode 100644 index e0ce8d1bc5..0000000000 --- a/packages/features/shell/CalAiBanner.tsx +++ /dev/null @@ -1,59 +0,0 @@ -"use client"; - -import { usePathname } from "next/navigation"; -import { useState } from "react"; - -import { useLocale } from "@calcom/lib/hooks/useLocale"; -import { localStorage } from "@calcom/lib/webstorage"; -import { Icon } from "@calcom/ui/components/icon"; - -export function CalAiBanner() { - const { t } = useLocale(); - const pathname = usePathname(); - const [isVisible, setIsVisible] = useState(() => { - if (typeof window === "undefined") return true; - return !localStorage.getItem("calai-banner-dismissed"); - }); - - const handleDismiss = () => { - localStorage.setItem("calai-banner-dismissed", "true"); - setIsVisible(false); - }; - - const handleTryNow = () => { - window.open("/workflow/new?action=calAi&templateWorkflowId=wf-11", "_blank"); - }; - - if (!isVisible) return null; - - if (!(pathname === "/workflows" || pathname === "/event-types" || pathname === "/bookings/upcoming")) - return null; - - return ( -
- - -
-
-

{t("supercharge_your_workflows_with_cal_ai")}

-

- {t("supercharge_your_workflows_with_cal_ai_description")} -

- - -
- - Cal.ai Banner -
-
- ); -} diff --git a/packages/features/shell/Shell.tsx b/packages/features/shell/Shell.tsx index 9e6eeb3d3c..7daa51bc71 100644 --- a/packages/features/shell/Shell.tsx +++ b/packages/features/shell/Shell.tsx @@ -1,7 +1,7 @@ "use client"; import { useSession } from "next-auth/react"; -import { usePathname, useRouter } from "next/navigation"; +import { useRouter } from "next/navigation"; import type { Dispatch, ReactElement, ReactNode, SetStateAction } from "react"; import React, { cloneElement } from "react"; import { Toaster } from "sonner"; @@ -17,7 +17,6 @@ import { Button } from "@calcom/ui/components/button"; import { ErrorBoundary } from "@calcom/ui/components/errorBoundary"; import { SkeletonText } from "@calcom/ui/components/skeleton"; -import { CalAiBanner } from "./CalAiBanner"; import { DynamicModals } from "./DynamicModals"; import { SideBarContainer } from "./SideBar"; import { TopNavContainer } from "./TopNav"; @@ -28,7 +27,6 @@ import { useAppTheme } from "./useAppTheme"; const Layout = (props: LayoutProps) => { const { banners, bannersHeight } = useBanners(); - const pathname = usePathname(); useFormbricks(); @@ -208,7 +206,6 @@ function MainContainer({ {/* show top navigation for md and smaller (tablet and phones) */} {TopNavContainerProp}
- {!props.withoutMain ? {props.children} : props.children}