"use client"; import { useCallback, useEffect, useRef, useState, type ReactNode } from "react"; import Link from "next/link"; import { ChatCircleDots, PaperPlaneTilt, Kanban, FlowArrow, ClipboardText, ArrowRight, CaretLeft, CaretRight, } from "@phosphor-icons/react/ssr"; import type { Icon as PhosphorIcon } from "@phosphor-icons/react"; import { CHAMFER } from "@/lib/chamfer"; import WebChatDemo from "@/components/sections/WebChatDemo"; import EmailBuilder from "@/components/sections/EmailBuilder"; import KanbanBoard from "@/components/sections/KanbanBoard"; import WorkflowEditor from "@/components/sections/WorkflowEditor"; import ApprovalInbox from "@/components/sections/ApprovalInbox"; const HEX = "polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%)"; type Module = { name: string; blurb: string; href: string; Icon: PhosphorIcon; demo: ReactNode }; // The real interactive product modules — shown here display-only (see the // `inert` embed below) with a CTA to the subpage where they're interactive. // Vertriebspipelines is intentionally excluded. const MODULES: Module[] = [ { name: "Team-Chat", blurb: "Projektkanäle und Aufgaben direkt aus dem Chat.", href: "/produkt/chat", Icon: ChatCircleDots, demo: }, { name: "E-Mail-Baukasten", blurb: "Kampagnen per Drag-and-drop selbst gebaut.", href: "/produkt/email-marketing", Icon: PaperPlaneTilt, demo: }, { name: "Kanban-Board", blurb: "Projekte und Baustellen im Blick.", href: "/produkt/projektmanagement", Icon: Kanban, demo: }, { name: "Workflow-Editor", blurb: "Abläufe visuell und ohne Code.", href: "/produkt/workflow-engine", Icon: FlowArrow, demo: }, { name: "Freigaben", blurb: "Anträge freigeben oder ablehnen, in Sekunden.", href: "/produkt/mitarbeitermanagement", Icon: ClipboardText, demo: }, ]; export default function WaitlistModules() { const trackRef = useRef(null); const [active, setActive] = useState(0); const goTo = useCallback((i: number) => { const track = trackRef.current; if (!track) return; const clamped = Math.max(0, Math.min(MODULES.length - 1, i)); track.scrollTo({ left: clamped * track.clientWidth, behavior: "smooth" }); }, []); // Make the embedded demos truly non-interactive: `inert` also drops them out // of the tab order (pointer-events:none only blocks the mouse). Set via DOM // property so it works regardless of React's attribute handling. useEffect(() => { trackRef.current?.querySelectorAll(".demo-embed").forEach((el) => { el.inert = true; }); }, []); // Keep the active dot/arrows in sync with native (swipe) scrolling. useEffect(() => { const track = trackRef.current; if (!track) return; let raf = 0; const onScroll = () => { cancelAnimationFrame(raf); raf = requestAnimationFrame(() => { setActive(Math.round(track.scrollLeft / track.clientWidth)); }); }; track.addEventListener("scroll", onScroll, { passive: true }); return () => { track.removeEventListener("scroll", onScroll); cancelAnimationFrame(raf); }; }, []); return ( {/* transition from the timeline into "what you actually get" */} DAS BEKOMMST DU Ein Blick in deinen künftigen Betrieb. Von Team-Chat bis Rechnungs-Automatik: die Module, mit denen dein Betrieb bald läuft. Wisch dich durch und probier jedes live auf seiner Seite aus. {/* arrows (desktop) */} goTo(active - 1)} disabled={active === 0} className="hidden md:grid place-items-center absolute left-0 top-1/2 -translate-y-1/2 -translate-x-1/2 z-20 w-11 h-11 rounded-full transition disabled:opacity-0" style={{ background: "#fff", color: "var(--text-primary)", boxShadow: "0 8px 24px -8px rgba(15,23,42,0.35)" }} > goTo(active + 1)} disabled={active === MODULES.length - 1} className="hidden md:grid place-items-center absolute right-0 top-1/2 -translate-y-1/2 translate-x-1/2 z-20 w-11 h-11 rounded-full transition disabled:opacity-0" style={{ background: "#fff", color: "var(--text-primary)", boxShadow: "0 8px 24px -8px rgba(15,23,42,0.35)" }} > {/* track */} {MODULES.map((m) => ( {/* caption */} {m.name} {m.blurb} {/* preview frame — display-only module + fade + CTA */} {m.demo} {/* bottom fade so the clipped module reads as a peek, not a cut */} Live ausprobieren ))} {/* dots */} {MODULES.map((m, i) => ( goTo(i)} className="rounded-full transition-all" style={{ width: i === active ? 26 : 9, height: 9, background: i === active ? "var(--accent-yellow)" : "var(--border-light)", }} /> ))} ); }
Von Team-Chat bis Rechnungs-Automatik: die Module, mit denen dein Betrieb bald läuft. Wisch dich durch und probier jedes live auf seiner Seite aus.
{m.blurb}