ragflow/web/src/components/indented-tree/modal.tsx
balibabu c5c0dd2da0
Feat: Display the knowledge graph on the knowledge base page #4543 (#4587)
### What problem does this PR solve?

Feat: Display the knowledge graph on the knowledge base page #4543

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
2025-01-22 19:43:27 +08:00

30 lines
726 B
TypeScript

import { useTranslation } from 'react-i18next';
import IndentedTree from './indented-tree';
import { useFetchKnowledgeGraph } from '@/hooks/knowledge-hooks';
import { IModalProps } from '@/interfaces/common';
import { Modal } from 'antd';
const IndentedTreeModal = ({
visible,
hideModal,
}: IModalProps<any> & { documentId: string }) => {
const { data } = useFetchKnowledgeGraph();
const { t } = useTranslation();
return (
<Modal
title={t('chunk.mind')}
open={visible}
onCancel={hideModal}
width={'90vw'}
footer={null}
>
<section>
<IndentedTree data={data?.mind_map} show></IndentedTree>
</section>
</Modal>
);
};
export default IndentedTreeModal;