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.

427 B
Raw Blame
// Fixture: read and edit are separate atoms; each host mounts what it needs.
import { Markdown } from '@lobehub/ui';
import { memo } from 'react';

import { useDocumentContent } from '@/store/document/hooks/useDocumentContent';

export const DocumentReader = memo<{ id: string }>(({ id }) => {
  const { data } = useDocumentContent(id);
  return <Markdown>{data?.content ?? ''}</Markdown>;
});

export default DocumentReader;