mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-11 20:01:10 +00:00
fix sdoc wiki bug
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
import React from 'react';
|
||||
import React, { Suspense } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
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 i18n from '../../_i18n/i18n-sdoc-editor';
|
||||
import { Utils } from '../../utils/utils';
|
||||
import Loading from '../loading';
|
||||
|
||||
@@ -104,7 +106,13 @@ class SdocWikiPageViewer extends React.Component {
|
||||
scrollRef: this.scrollRef,
|
||||
};
|
||||
|
||||
return <WikiViewer {...props} />;
|
||||
return (
|
||||
<I18nextProvider i18n={ i18n }>
|
||||
<Suspense fallback={<Loading />}>
|
||||
<WikiViewer {...props} />
|
||||
</Suspense>
|
||||
</I18nextProvider>
|
||||
);
|
||||
};
|
||||
|
||||
render() {
|
||||
|
Reference in New Issue
Block a user