"use client"; import { useEffect, useState } from "react"; import { useTranslations } from "next-intl"; import ProviderIcon from "@/shared/components/ProviderIcon"; export default function FlowAnimation() { const t = useTranslations("landing"); const [activeFlow, setActiveFlow] = useState(0); const cliTools = [ { id: "claude", name: t("flowToolClaudeCode") }, { id: "codex", name: t("flowToolOpenAICodex") }, { id: "cline", name: t("flowToolCline") }, { id: "cursor", name: t("flowToolCursor") }, ]; 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")}