"use client"; import { useEffect, useState } from "react"; import Image from "next/image"; import { useTranslations } from "next-intl"; export default function FlowAnimation() { const t = useTranslations("landing"); const [activeFlow, setActiveFlow] = useState(0); const cliTools = [ { id: "claude", name: t("flowToolClaudeCode"), image: "/providers/claude.png" }, { id: "codex", name: t("flowToolOpenAICodex"), image: "/providers/codex.png" }, { id: "cline", name: t("flowToolCline"), image: "/providers/cline.png" }, { id: "cursor", name: t("flowToolCursor"), image: "/providers/cursor.png" }, ]; const providers = [ { id: "openai", name: t("flowProviderOpenAI"), color: "bg-emerald-500", textColor: "text-white", }, { id: "anthropic", name: t("flowProviderAnthropic"), color: "bg-orange-400", textColor: "text-white", }, { id: "gemini", name: t("flowProviderGemini"), color: "bg-blue-500", textColor: "text-white", }, { id: "github", name: t("flowProviderGithubCopilot"), color: "bg-gray-700", textColor: "text-white", }, ]; useEffect(() => { const interval = setInterval(() => { setActiveFlow((prev) => (prev + 1) % providers.length); }, 2000); return () => clearInterval(interval); }, [providers.length]); return (
{t("interactiveDiagram")}