1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-11 11:51:27 +00:00

fix sdoc wiki bug

This commit is contained in:
杨顺强
2024-04-23 17:06:13 +08:00
parent cd7329e711
commit c0319ce430

View File

@@ -1,7 +1,9 @@
import React from 'react'; import React, { Suspense } from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { WikiViewer } from '@seafile/sdoc-editor'; import { WikiViewer } from '@seafile/sdoc-editor';
import { I18nextProvider } from 'react-i18next';
import { appAvatarURL, assetsUrl, gettext, name, repoID, serviceURL, sharedToken, siteRoot, slug, username } from '../../utils/constants'; import { appAvatarURL, assetsUrl, gettext, name, repoID, serviceURL, sharedToken, siteRoot, slug, username } from '../../utils/constants';
import i18n from '../../_i18n/i18n-sdoc-editor';
import { Utils } from '../../utils/utils'; import { Utils } from '../../utils/utils';
import Loading from '../loading'; import Loading from '../loading';
@@ -104,7 +106,13 @@ class SdocWikiPageViewer extends React.Component {
scrollRef: this.scrollRef, scrollRef: this.scrollRef,
}; };
return <WikiViewer {...props} />; return (
<I18nextProvider i18n={ i18n }>
<Suspense fallback={<Loading />}>
<WikiViewer {...props} />
</Suspense>
</I18nextProvider>
);
}; };
render() { render() {