import React, { ReactNode, useEffect, useState } from "react"; import { branding } from "../../lib/branding"; const panelFeatures = [ { title: "Jitsu Functions", href: "https://jitsu.com/features/functions", description: "Transform, enrich, and route events in-flight with TypeScript — call APIs, persist state.", }, { title: "Real-time streaming", href: "https://jitsu.com/features/event-streaming", description: "Land events in your warehouse the moment they happen.", }, { title: "Drop-in for Segment", href: "https://jitsu.com/features/segment-compatibility", description: "Same SDK shape — keep your existing instrumentation.", }, ]; const customers: { name: string; href?: string }[] = [ { name: "Investing.com", href: "https://jitsu.com/customers/investing" }, { name: "PandaDoc" }, { name: "Rarible" }, { name: "Census" }, { name: "Embeddables" }, ]; const snippets = [ { file: "enrich.ts", badge: "JITSU FUNCTION", code: `export default async function (event, { store }) { const geo = await store.get(event.ip); event.country = geo?.country ?? "unknown"; return event; }`, }, { file: "track.ts", badge: "BROWSER SDK", code: `import { jitsuAnalytics } from "@jitsu/js"; const jitsu = jitsuAnalytics({ writeKey: "KEY" }); jitsu.identify("user_42", { email }); jitsu.track("Signup Completed", { plan: "pro" });`, }, ]; // Tiny token highlighter for the (fixed, trusted) code samples — keeps the // snippets as plain strings instead of hand-written colored JSX. const CODE_TOKEN = /(`[^`]*`|"[^"]*"|'[^']*'|\b(?:import|from|export|default|async|function|const|await|return|new)\b)/g; const KEYWORD = /^(?:import|from|export|default|async|function|const|await|return|new)$/; function highlightLine(line: string): ReactNode { if (line === "") { return " "; } return line.split(CODE_TOKEN).map((part, i) => { if (!part) { return null; } if (part[0] === "`" || part[0] === '"' || part[0] === "'") { return ( {part} ); } if (KEYWORD.test(part)) { return ( {part} ); } return {part}; }); } /** Code card that auto-cycles through the snippets; a manual click pins it. */ const CodeShowcase: React.FC = () => { const [active, setActive] = useState(0); const [autoSwitch, setAutoSwitch] = useState(true); useEffect(() => { if (!autoSwitch) { return; } const t = setInterval(() => setActive(a => (a + 1) % snippets.length), 4500); return () => clearInterval(t); }, [autoSwitch]); // A manual pick stops the auto-cycle for good. const selectTab = (i: number) => { setActive(i); setAutoSwitch(false); }; const snippet = snippets[active]; return (
{snippets.map((s, i) => ( ))}
{snippet.badge}
{snippet.code.split("\n").map((line, i) => (
{highlightLine(line)}
))}
); }; /** Left-hand testimonial / proof panel of the signup page. Hidden below `lg`. */ export const SignupMarketingPanel: React.FC = () => (
{/* one column — every section shares the same width */}
{/* header */}
{branding.logo}
{/* fill-white overrides the one hardcoded fill="black" path in the wordmark */}
{branding.wordmark}
‹ Back to jitsu.com
{/* testimonial */}
“

Jitsu Functions let us enrich events server-side with external APIs and a persistent KV store —{" "} killing the client-side code duplication across web, iOS, and Android.

Investing.com
5B
EVENTS / MONTH
{/* code showcase */} {/* features */}
{panelFeatures.map(f => (
✓ {f.title}

{f.description}

))}
{/* social proof */}
IN PRODUCTION AT
{customers.map((c, i) => ( {i > 0 && ·} {c.href ? ( {c.name} ) : ( {c.name} )} ))}
);