Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

404 B
Raw Blame
// Fixture: the same read through the SWR path.
import { memo } from 'react';

import { useClientDataSWR } from '@/libs/swr';
import { agentService } from '@/services/agent';

const AgentTitle = memo<{ id: string }>(({ id }) => {
  const { data } = useClientDataSWR(['agent-config', id], () => agentService.getAgentConfig(id));

  return <span>{data?.title ?? ''}</span>;
});

export default AgentTitle;