Skip to content

AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents

384 B
Raw Blame
import { Navigate } from 'react-router-dom';

import { useAgentsAvailable } from '@/features/agents';

type AgentsFlagGuardProps = {
  children: React.ReactNode;
};

export const AgentsFlagGuard = ({ children }: AgentsFlagGuardProps) => {
  const agentsAvailable = useAgentsAvailable();
  if (!agentsAvailable) {
    return <Navigate to="/flows" replace />;
  }
  return children;
};