From 5bae3368d733dd0d93d005d1603701bc6603f7dd Mon Sep 17 00:00:00 2001 From: Jiayuan Zhang Date: Sun, 12 Apr 2026 02:42:05 +0800 Subject: [PATCH] feat(landing): add install command copy block to hero section (#743) Adds a terminal-style one-click copy block below the CTA buttons showing the curl install command, with a copy-to-clipboard button that shows a checkmark on success. --- .../landing/components/landing-hero.tsx | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/apps/web/features/landing/components/landing-hero.tsx b/apps/web/features/landing/components/landing-hero.tsx index 96e01f3f2..ccc3baf29 100644 --- a/apps/web/features/landing/components/landing-hero.tsx +++ b/apps/web/features/landing/components/landing-hero.tsx @@ -1,5 +1,6 @@ "use client"; +import { useCallback, useState } from "react"; import Image from "next/image"; import Link from "next/link"; import { useAuthStore } from "@multica/core/auth"; @@ -52,6 +53,8 @@ export function LandingHero() { GitHub + +
@@ -87,6 +90,64 @@ export function LandingHero() { ); } +const INSTALL_COMMAND = + "curl -fsSL https://raw.githubusercontent.com/multica-ai/multica/main/scripts/install.sh | bash"; + +function InstallCommand() { + const [copied, setCopied] = useState(false); + + const handleCopy = useCallback(async () => { + try { + await navigator.clipboard.writeText(INSTALL_COMMAND); + setCopied(true); + setTimeout(() => setCopied(false), 2000); + } catch { + // ignore + } + }, []); + + return ( +
+ +
+ ); +} + function LandingBackdrop() { return (