diff --git a/apps/marketing/src/app/[lang]/automations/page.tsx b/apps/marketing/src/app/[lang]/automations/page.tsx index d77c4e3a2bf..d9f8dd0d32a 100644 --- a/apps/marketing/src/app/[lang]/automations/page.tsx +++ b/apps/marketing/src/app/[lang]/automations/page.tsx @@ -4,7 +4,6 @@ import { getI18nInstance } from "@superset/i18n/server"; import { COMPANY, SOCIAL } from "@superset/shared/constants"; import { ArrowUpRight } from "lucide-react"; import type { Metadata } from "next"; -import { CTASection } from "@/app/[lang]/components/CTASection"; import { ProductHeroActions } from "@/app/[lang]/components/ProductHeroActions"; import { localizedAlternates } from "@/app/[lang]/metadata"; import { initServerI18n } from "@/app/i18n-server"; @@ -109,7 +108,6 @@ export default async function AutomationsPage() { - ); } diff --git a/apps/marketing/src/app/[lang]/browser/page.tsx b/apps/marketing/src/app/[lang]/browser/page.tsx index 9cc8ecb971e..c38f7af6ef1 100644 --- a/apps/marketing/src/app/[lang]/browser/page.tsx +++ b/apps/marketing/src/app/[lang]/browser/page.tsx @@ -2,7 +2,6 @@ import { msg } from "@lingui/core/macro"; import { Trans, useLingui } from "@lingui/react/macro"; import { getI18nInstance } from "@superset/i18n/server"; import type { Metadata } from "next"; -import { CTASection } from "@/app/[lang]/components/CTASection"; import { ProductHeroActions } from "@/app/[lang]/components/ProductHeroActions"; import { localizedAlternates } from "@/app/[lang]/metadata"; import { initServerI18n } from "@/app/i18n-server"; @@ -93,7 +92,6 @@ export default async function BrowserPage() { - ); } diff --git a/apps/marketing/src/app/[lang]/components/CTASection/components/InstallCommand/InstallCommand.tsx b/apps/marketing/src/app/[lang]/components/CTASection/components/InstallCommand/InstallCommand.tsx deleted file mode 100644 index 694c9867819..00000000000 --- a/apps/marketing/src/app/[lang]/components/CTASection/components/InstallCommand/InstallCommand.tsx +++ /dev/null @@ -1,80 +0,0 @@ -"use client"; - -import { useLingui } from "@lingui/react/macro"; -import { Check, Copy } from "lucide-react"; -import { useState } from "react"; -import { track } from "@/lib/analytics"; -import { DEFAULT_INSTALL_TAB, INSTALL_TABS } from "./constants"; - -export function InstallCommand() { - const { t } = useLingui(); - const [activeTabId, setActiveTabId] = useState(DEFAULT_INSTALL_TAB.id); - const [copied, setCopied] = useState(false); - - const activeTab = - INSTALL_TABS.find((tab) => tab.id === activeTabId) ?? DEFAULT_INSTALL_TAB; - - const handleCopy = async () => { - try { - await navigator.clipboard.writeText(activeTab.command); - } catch { - // Clipboard unavailable (e.g. insecure context); ignore - return; - } - track("download_command_copied", { - source: "cli_install", - surface: "cta_section", - method: activeTab.id, - }); - setCopied(true); - setTimeout(() => setCopied(false), 2000); - }; - - return ( -
-
-
- {INSTALL_TABS.map((tab) => ( - - ))} -
- -
-
- {activeTab.shell && ( - $ - )} - - {activeTab.command} - -
-
- ); -} diff --git a/apps/marketing/src/app/[lang]/components/CTASection/components/InstallCommand/constants.ts b/apps/marketing/src/app/[lang]/components/CTASection/components/InstallCommand/constants.ts deleted file mode 100644 index 03541bc83a5..00000000000 --- a/apps/marketing/src/app/[lang]/components/CTASection/components/InstallCommand/constants.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { CANONICAL_URLS } from "@superset/shared/constants"; -export interface InstallTab { - id: string; - label: string; - command: string; - /** Shell commands get a `$` prompt prefix; agent prompts do not. */ - shell: boolean; -} - -export const DEFAULT_INSTALL_TAB: InstallTab = { - id: "brew", - label: "brew", - command: "brew install paradevai/tap/superset", - shell: true, -}; - -export const INSTALL_TABS: InstallTab[] = [ - DEFAULT_INSTALL_TAB, - { - id: "curl", - label: "curl", - command: `curl -fsSL ${CANONICAL_URLS.MARKETING}/cli/install.sh | sh`, - shell: true, - }, - { - id: "agent", - label: "agent", - command: `Install the Paradev CLI: ${CANONICAL_URLS.MARKETING}/llms.txt`, - shell: false, - }, -]; diff --git a/apps/marketing/src/app/[lang]/components/CTASection/components/InstallCommand/index.ts b/apps/marketing/src/app/[lang]/components/CTASection/components/InstallCommand/index.ts deleted file mode 100644 index 700e28b5ddd..00000000000 --- a/apps/marketing/src/app/[lang]/components/CTASection/components/InstallCommand/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { InstallCommand } from "./InstallCommand"; diff --git a/apps/marketing/src/app/[lang]/components/EdgeGlare/EdgeGlare.tsx b/apps/marketing/src/app/[lang]/components/EdgeGlare/EdgeGlare.tsx index 6ca371c5e25..cf7a2867037 100644 --- a/apps/marketing/src/app/[lang]/components/EdgeGlare/EdgeGlare.tsx +++ b/apps/marketing/src/app/[lang]/components/EdgeGlare/EdgeGlare.tsx @@ -2,7 +2,7 @@ import type { CSSProperties } from "react"; import { useRef } from "react"; -import { usePointerVars } from "./hooks/usePointerVars"; +import { usePointerVars } from "@/app/[lang]/hooks/usePointerVars"; type Edges = "ring" | "horizontal"; diff --git a/apps/marketing/src/app/[lang]/components/Footer/Footer.tsx b/apps/marketing/src/app/[lang]/components/Footer/Footer.tsx index 7cfddc75aec..d483d50afcb 100644 --- a/apps/marketing/src/app/[lang]/components/Footer/Footer.tsx +++ b/apps/marketing/src/app/[lang]/components/Footer/Footer.tsx @@ -17,6 +17,7 @@ import { } from "@superset/ui/dropdown-menu"; import { m } from "framer-motion"; import { ArrowUpRight, Check, ChevronDown, Languages } from "lucide-react"; +import dynamic from "next/dynamic"; import Link from "next/link"; import { usePathname } from "next/navigation"; import type { ReactNode } from "react"; @@ -24,6 +25,11 @@ import { FaApple } from "react-icons/fa"; import { track } from "@/lib/analytics"; import { Soc2Badge } from "../Soc2Badge"; import { SocialLinks } from "../SocialLinks"; +import { FooterBackdrop } from "./components/FooterBackdrop"; + +const CTASection = dynamic(() => + import("./components/CTASection").then((mod) => mod.CTASection), +); function SupersetLogo() { return ( @@ -192,23 +198,27 @@ export function Footer({ if (pathname === "/download") return null; return ( -