import React from 'react';
import ReactDOM from 'react-dom';
import KnowledgeModal from '../../src';
import knowledgeList from './data';

function App() {
  setTimeout(() => {
    console.log('发送数据, 若没数据请检测当前是否用的是documentEvent协议');
    const event = new CustomEvent('documentMessage', {
      detail: {
        type: 'knowledgeMind.initKnowledgeList',
        headers: {
          reqId: '1213123123',
        },
        data: {
          body: {
            knowledgeList,
          },
        },
      },
    });
    document.dispatchEvent(event);
  }, 2000);
  return <KnowledgeModal />;
}

ReactDOM.render(<App />, document.getElementById('root'));
