refactor: remove cal ai banners (#24885)
This commit is contained in:
1 parent
04fc0f1d52
commit
0a2ddf05ca
4 files changed
+1
-66
No files matched your search
@@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="345" height="138" fill="none"><g clip-path="url(#a)"><path fill="#262543" d="M190.792 16.5h76.416c5.922 0 10.334 0 13.831.286 3.491.285 6.026.852 8.202 1.961a20.623 20.623 0 0 1 9.012 9.012c1.109 2.176 1.676 4.711 1.961 8.202.286 3.497.286 7.909.286 13.831v94.416c0 5.922 0 10.334-.286 13.831-.285 3.491-.852 6.026-1.961 8.202a20.623 20.623 0 0 1-9.012 9.012c-2.176 1.109-4.711 1.676-8.202 1.961-3.497.286-7.909.286-13.831.286h-76.416c-5.922 0-10.334 0-13.831-.286-3.491-.285-6.026-.852-8.202-1.961a20.623 20.623 0 0 1-9.012-9.012c-1.109-2.176-1.676-4.711-1.961-8.202-.286-3.497-.286-7.909-.286-13.831V49.792c0-5.922 0-10.334.286-13.831.285-3.49.852-6.026 1.961-8.202a20.623 20.623 0 0 1 9.012-9.012c2.176-1.109 4.711-1.676 8.202-1.96 3.497-.287 7.909-.287 13.831-.287Z"/><path stroke="url(#b)" d="M190.792 16.5h76.416c5.922 0 10.334 0 13.831.286 3.491.285 6.026.852 8.202 1.961a20.623 20.623 0 0 1 9.012 9.012c1.109 2.176 1.676 4.711 1.961 8.202.286 3.497.286 7.909.286 13.831v94.416c0 5.922 0 10.334-.286 13.831-.285 3.491-.852 6.026-1.961 8.202a20.623 20.623 0 0 1-9.012 9.012c-2.176 1.109-4.711 1.676-8.202 1.961-3.497.286-7.909.286-13.831.286h-76.416c-5.922 0-10.334 0-13.831-.286-3.491-.285-6.026-.852-8.202-1.961a20.623 20.623 0 0 1-9.012-9.012c-1.109-2.176-1.676-4.711-1.961-8.202-.286-3.497-.286-7.909-.286-13.831V49.792c0-5.922 0-10.334.286-13.831.285-3.49.852-6.026 1.961-8.202a20.623 20.623 0 0 1 9.012-9.012c2.176-1.109 4.711-1.676 8.202-1.96 3.497-.287 7.909-.287 13.831-.287Z"/><path fill="#F7F7F7" d="M188.74 30.627v-3.433h-.052l-1.037.73v-.699l1.089-.765h.742v4.167h-.742ZM185.743 30.627v-.8h-2.039v-.61l.329-.562a54.437 54.437 0 0 1 .682-1.12c.115-.185.23-.367.343-.546.116-.181.231-.358.347-.529h1.048v2.752h.563v.615h-.563v.8h-.71Zm-1.346-1.397h1.357v-2.175h-.043l-.263.404-.269.425c-.09.144-.18.29-.268.436a32.092 32.092 0 0 0-.514.866v.044ZM182.41 30.067a.444.444 0 0 1-.459-.453.446.446 0 0 1 .459-.456.44.44 0 0 1 .329.132c.087.087.13.195.13.323a.444.444 0 0 1-.459.454Zm0-2.143a.444.444 0 0 1-.459-.453.446.446 0 0 1 .459-.456.44.44 0 0 1 .329.132c.087.087.13.195.13.324a.444.444 0 0 1-.459.453ZM179.433 26.356c.223 0 .435.042.635.124.2.081.378.208.532.382.155.17.278.391.366.66.089.268.133.59.133.968v.006c0 .468-.067.868-.202 1.201a1.69 1.69 0 0 1-.58.768c-.251.177-.55.266-.899.266-.256 0-.487-.046-.693-.139a1.42 1.42 0 0 1-.508-.386 1.346 1.346 0 0 1-.268-.566l-.006-.032h.73l.012.029a.722.722 0 0 0 .404.424.894.894 0 0 0 .329.058c.22 0 .399-.065.538-.194.14-.13.245-.305.314-.522.072-.22.112-.462.122-.728.002-.029.002-.057.002-.084v-.084l-.129-.695a.859.859 0 0 0-.11-.43.82.82 0 0 0-1.43-.01.804.804 0 0 0-.112.422v.006c0 .162.035.305.107.43.071.123.168.22.291.292a.828.828 0 0 0 .422.107.859.859 0 0 0 .424-.104.774.774 0 0 0 .298-.289.806.806 0 0 0 .11-.419v-.005h.173v.768h-.101a.99.99 0 0 1-.223.306c-.098.094-.219.17-.363.228-.143.058-.31.087-.503.087-.266 0-.5-.06-.705-.18a1.302 1.302 0 0 1-.482-.49 1.432 1.432 0 0 1-.173-.705v-.006c0-.283.065-.534.196-.753a1.4 1.4 0 0 1 .549-.52c.235-.127.501-.19.8-.19ZM287.143 27.912v1.417c.279-.12.462-.4.462-.709a.771.771 0 0 0-.462-.709ZM278.793 28.336c0-.487 0-.731.095-.917a.865.865 0 0 1 .38-.38c.186-.095.43-.095.917-.095h4.522c.487 0 .731 0 .917.095a.865.865 0 0 1 .38.38c.095.186.095.43.095.917v.348c0 .487 0 .73-.095.916a.866.866 0 0 1-.38.38c-.186.095-.43.095-.917.095h-4.522c-.487 0-.731 0-.917-.095a.866.866 0 0 1-.38-.38c-.095-.186-.095-.43-.095-.917v-.347Z"/><path fill="#F7F7F7" fill-rule="evenodd" d="M272.625 27.328c.866 0 1.698.32 2.325.896a.123.123 0 0 0 .169-.001l.451-.44a.119.119 0 0 0 .037-.086.118.118 0 0 0-.038-.085c-1.645-1.522-4.242-1.522-5.888 0a.117.117 0 0 0-.037.085.118.118 0 0 0 .036.086l.452.44a.123.123 0 0 0 .169.001 3.44 3.44 0 0 1 2.324-.896Zm-.001 1.468c.472 0 .928.178 1.278.5a.12.12 0 0 0 .168-.002l.448-.46a.131.131 0 0 0 .036-.09.126.126 0 0 0-.038-.09 2.748 2.748 0 0 0-3.782 0 .127.127 0 0 0-.002.18l.448.46a.12.12 0 0 0 .168.002c.349-.322.804-.5 1.276-.5Zm.878.972a.141.141 0 0 1-.035.098l-.757.854a.114.114 0 0 1-.084.039.111.111 0 0 1-.084-.04l-.758-.853a.141.141 0 0 1-.035-.098c0-.037.015-.071.039-.096a1.194 1.194 0 0 1 1.675 0c.025.025.039.06.039.096ZM267.035 26.833c0-.22-.166-.398-.371-.398h-.371c-.205 0-.371.178-.371.398v3.456c0 .22.166.399.371.399h.371c.205 0 .371-.178.371-.399v-3.456Zm-2.586.452h.371c.205 0 .371.183.371.409v2.586c0 .225-.166.408-.371.408h-.371c-.205 0-.372-.183-.372-.408v-2.586c0-.226.167-.409.372-.409Zm-1.507.922h-.371c-.205 0-.372.185-.372.413v1.654c0 .229.167.414.372.414h.371c.205 0 .371-.185.371-.413V28.62c0-.228-.166-.413-.371-.413Zm-1.844.85h-.372c-.204 0-.371.183-.371.408v.815c0 .226.167.408.371.408h.372c.204 0 .371-.182.371-.408v-.815c0-.225-.167-.407-.371-.407Z" clip-rule="evenodd"/><path fill="#B2B2B2" d="M270.752 57.498c-.322 0-.642-.061-.957-.185a2.34 2.34 0 0 1-.855-.6c-.254-.277-.457-.642-.61-1.094-.153-.456-.23-1.016-.23-1.68v-.01c0-.8.108-1.484.323-2.05.215-.57.524-1.Line truncated
|
||||
|
Before Width: | Height: | Size: 87 KiB |
@@ -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.",
|
||||
|
||||
@@ -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 (
|
||||
<div className="bg-launch-dark relative mb-6 w-full overflow-hidden rounded-lg text-white">
|
||||
<button
|
||||
onClick={handleDismiss}
|
||||
className="absolute right-2 top-2 z-10 rounded-[10px] p-2"
|
||||
aria-label="Close banner">
|
||||
<Icon name="x" className="h-4 w-4 text-white" />
|
||||
</button>
|
||||
|
||||
<div className="flex flex-col md:flex-row">
|
||||
<div className="flex-1 p-6 pr-6 lg:p-8">
|
||||
<h2 className="font-cal font-subtle text-lg">{t("supercharge_your_workflows_with_cal_ai")}</h2>
|
||||
<p className="text-subtle mb-4 text-sm">
|
||||
{t("supercharge_your_workflows_with_cal_ai_description")}
|
||||
</p>
|
||||
|
||||
<button
|
||||
onClick={handleTryNow}
|
||||
className="rounded-[10px] bg-gradient-to-b from-[#6349EA] to-[#875FE0] px-5 py-2 text-sm font-medium text-white hover:from-[#5A42D1] hover:to-[#7B6FD7]">
|
||||
{t("try_now")}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<img src="/cal-ai-banner.svg" alt="Cal.ai Banner" className="mt-auto hidden h-40 md:block" />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -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}
|
||||
<div className="max-w-full p-2 sm:py-4 lg:px-6">
|
||||
<CalAiBanner />
|
||||
<ErrorBoundary>
|
||||
{!props.withoutMain ? <ShellMain {...props}>{props.children}</ShellMain> : props.children}
|
||||
</ErrorBoundary>
|
||||
|
||||
Reference in new issue
Block a user