1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-08-29 04:01:24 +00:00
seahub/frontend/src/index.js

27 lines
930 B
JavaScript
Raw Normal View History

2018-05-02 06:09:58 +00:00
// Import React!
2023-12-08 09:58:27 +00:00
import React, { Suspense } from 'react';
import { createRoot } from 'react-dom/client';
2018-05-02 06:09:58 +00:00
import { I18nextProvider } from 'react-i18next';
2023-12-08 09:58:27 +00:00
import i18n from './_i18n/i18n-seafile-editor';
2022-05-13 03:19:16 +00:00
import MarkdownEditor from './pages/markdown-editor';
2023-12-08 09:58:27 +00:00
import Loading from './components/loading';
import { MetadataStatusProvider } from './hooks';
import { CollaboratorsProvider } from './metadata';
2018-05-02 06:09:58 +00:00
import './index.css';
const { repoID, repoEncrypted, filePerm } = window.app.pageOptions;
2024-09-27 06:05:45 +00:00
const root = createRoot(document.getElementById('root'));
root.render(
<I18nextProvider i18n={ i18n } >
2023-12-08 09:58:27 +00:00
<Suspense fallback={<Loading />}>
<MetadataStatusProvider repoID={repoID} repoInfo={{ permission: filePerm, encrypted: repoEncrypted }}>
2024-09-27 06:05:45 +00:00
<CollaboratorsProvider repoID={repoID}>
<MarkdownEditor />
</CollaboratorsProvider>
</MetadataStatusProvider>
2023-12-08 09:58:27 +00:00
</Suspense>
</I18nextProvider>
2018-05-02 06:09:58 +00:00
);