2018-05-02 14:09:58 +08:00
|
|
|
// Import React!
|
2023-12-08 17:58:27 +08:00
|
|
|
import React, { Suspense } from 'react';
|
2022-12-29 12:21:47 +08:00
|
|
|
import ReactDom from 'react-dom';
|
2018-05-02 14:09:58 +08:00
|
|
|
import { I18nextProvider } from 'react-i18next';
|
2023-12-08 17:58:27 +08:00
|
|
|
import i18n from './_i18n/i18n-seafile-editor';
|
2022-05-13 11:19:16 +08:00
|
|
|
import MarkdownEditor from './pages/markdown-editor';
|
2023-12-08 17:58:27 +08:00
|
|
|
import Loading from './components/loading';
|
2024-11-22 17:11:55 +08:00
|
|
|
import { MetadataStatusProvider } from './hooks';
|
|
|
|
import { CollaboratorsProvider } from './metadata';
|
2020-12-21 16:21:51 +08:00
|
|
|
|
2018-05-02 14:09:58 +08:00
|
|
|
import './index.css';
|
|
|
|
|
2024-09-27 14:05:45 +08:00
|
|
|
const { repoID } = window.app.pageOptions;
|
|
|
|
|
2022-12-29 12:21:47 +08:00
|
|
|
ReactDom.render(
|
2019-08-31 22:58:38 +08:00
|
|
|
<I18nextProvider i18n={ i18n } >
|
2023-12-08 17:58:27 +08:00
|
|
|
<Suspense fallback={<Loading />}>
|
2024-11-22 17:11:55 +08:00
|
|
|
<MetadataStatusProvider repoID={repoID}>
|
2024-09-27 14:05:45 +08:00
|
|
|
<CollaboratorsProvider repoID={repoID}>
|
|
|
|
<MarkdownEditor />
|
|
|
|
</CollaboratorsProvider>
|
2024-11-22 17:11:55 +08:00
|
|
|
</MetadataStatusProvider>
|
2023-12-08 17:58:27 +08:00
|
|
|
</Suspense>
|
2022-12-29 12:21:47 +08:00
|
|
|
</I18nextProvider>,
|
|
|
|
document.getElementById('root')
|
2018-05-02 14:09:58 +08:00
|
|
|
);
|