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.

504 B
Raw Blame
'use client';

import { useParams } from 'react-router';

import AgentDocumentPage from '@/features/AgentDocumentPage';
import { getIdFromIdentifier } from '@/utils/identifier';

const AgentDocumentRoute = () => {
  const { docId } = useParams<{ docId: string }>();
  const documentId = getIdFromIdentifier(docId ?? '', 'docs');

  // key remounts the editor when switching between documents
  return <AgentDocumentPage documentId={documentId} key={documentId} />;
};

export default AgentDocumentRoute;