1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-08-31 14:42:10 +00:00
Files
seahub/frontend/src/index.js

27 lines
811 B
JavaScript
Raw Normal View History

2018-05-02 14:09:58 +08:00
// Import React!
2023-12-08 17:58:27 +08:00
import React, { Suspense } from 'react';
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';
import { MetadataStatusProvider } from './hooks';
import { CollaboratorsProvider } from './metadata';
2018-05-02 14:09:58 +08:00
import './index.css';
2024-09-27 14:05:45 +08:00
const { repoID } = window.app.pageOptions;
ReactDom.render(
<I18nextProvider i18n={ i18n } >
2023-12-08 17:58:27 +08:00
<Suspense fallback={<Loading />}>
<MetadataStatusProvider repoID={repoID}>
2024-09-27 14:05:45 +08:00
<CollaboratorsProvider repoID={repoID}>
<MarkdownEditor />
</CollaboratorsProvider>
</MetadataStatusProvider>
2023-12-08 17:58:27 +08:00
</Suspense>
</I18nextProvider>,
document.getElementById('root')
2018-05-02 14:09:58 +08:00
);