|
@@ -1,16 +1,16 @@
|
|
|
import React, { useCallback, useEffect } from 'react';
|
|
import React, { useCallback, useEffect } from 'react';
|
|
|
|
|
+
|
|
|
import PropTypes from 'prop-types';
|
|
import PropTypes from 'prop-types';
|
|
|
-import { withTranslation } from 'react-i18next';
|
|
|
|
|
-import loggerFactory from '~/utils/logger';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import PageContainer from '~/client/services/PageContainer';
|
|
import PageContainer from '~/client/services/PageContainer';
|
|
|
-import { addSmoothScrollEvent } from '~/client/util/smooth-scroll';
|
|
|
|
|
import { blinkElem } from '~/client/util/blink-section-header';
|
|
import { blinkElem } from '~/client/util/blink-section-header';
|
|
|
|
|
+import { addSmoothScrollEvent } from '~/client/util/smooth-scroll';
|
|
|
|
|
+import loggerFactory from '~/utils/logger';
|
|
|
|
|
|
|
|
-import { withUnstatedContainers } from './UnstatedUtils';
|
|
|
|
|
|
|
|
|
|
import { StickyStretchableScroller } from './StickyStretchableScroller';
|
|
import { StickyStretchableScroller } from './StickyStretchableScroller';
|
|
|
|
|
+import { withUnstatedContainers } from './UnstatedUtils';
|
|
|
|
|
|
|
|
// eslint-disable-next-line no-unused-vars
|
|
// eslint-disable-next-line no-unused-vars
|
|
|
const logger = loggerFactory('growi:TableOfContents');
|
|
const logger = loggerFactory('growi:TableOfContents');
|
|
@@ -21,7 +21,7 @@ const logger = loggerFactory('growi:TableOfContents');
|
|
|
*/
|
|
*/
|
|
|
const TableOfContents = (props) => {
|
|
const TableOfContents = (props) => {
|
|
|
|
|
|
|
|
- const { t, pageContainer } = props;
|
|
|
|
|
|
|
+ const { pageContainer } = props;
|
|
|
const { pageUser } = pageContainer.state;
|
|
const { pageUser } = pageContainer.state;
|
|
|
const isUserPage = pageUser != null;
|
|
const isUserPage = pageUser != null;
|
|
|
|
|
|
|
@@ -87,9 +87,7 @@ const TableOfContents = (props) => {
|
|
|
const TableOfContentsWrapper = withUnstatedContainers(TableOfContents, [PageContainer]);
|
|
const TableOfContentsWrapper = withUnstatedContainers(TableOfContents, [PageContainer]);
|
|
|
|
|
|
|
|
TableOfContents.propTypes = {
|
|
TableOfContents.propTypes = {
|
|
|
- t: PropTypes.func.isRequired, // i18next
|
|
|
|
|
-
|
|
|
|
|
pageContainer: PropTypes.instanceOf(PageContainer).isRequired,
|
|
pageContainer: PropTypes.instanceOf(PageContainer).isRequired,
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
-export default withTranslation()(TableOfContentsWrapper);
|
|
|
|
|
|
|
+export default TableOfContentsWrapper;
|