|
@@ -1,14 +1,13 @@
|
|
|
import React, { useCallback } from 'react';
|
|
import React, { useCallback } from 'react';
|
|
|
|
|
|
|
|
import { pagePathUtils } from '@growi/core';
|
|
import { pagePathUtils } from '@growi/core';
|
|
|
|
|
+import dynamic from 'next/dynamic';
|
|
|
import ReactMarkdown from 'react-markdown';
|
|
import ReactMarkdown from 'react-markdown';
|
|
|
|
|
|
|
|
import { useCurrentPagePath } from '~/stores/page';
|
|
import { useCurrentPagePath } from '~/stores/page';
|
|
|
import { useTocOptions } from '~/stores/renderer';
|
|
import { useTocOptions } from '~/stores/renderer';
|
|
|
import loggerFactory from '~/utils/logger';
|
|
import loggerFactory from '~/utils/logger';
|
|
|
|
|
|
|
|
-import { StickyStretchableScroller } from './StickyStretchableScroller';
|
|
|
|
|
-
|
|
|
|
|
import styles from './TableOfContents.module.scss';
|
|
import styles from './TableOfContents.module.scss';
|
|
|
|
|
|
|
|
const { isUserPage: _isUserPage } = pagePathUtils;
|
|
const { isUserPage: _isUserPage } = pagePathUtils;
|
|
@@ -17,6 +16,7 @@ const { isUserPage: _isUserPage } = pagePathUtils;
|
|
|
const logger = loggerFactory('growi:TableOfContents');
|
|
const logger = loggerFactory('growi:TableOfContents');
|
|
|
|
|
|
|
|
const TableOfContents = (): JSX.Element => {
|
|
const TableOfContents = (): JSX.Element => {
|
|
|
|
|
+ const StickyStretchableScroller = dynamic(() => import('./StickyStretchableScroller').then(mod => mod.StickyStretchableScroller), { ssr: false });
|
|
|
|
|
|
|
|
const { data: currentPagePath } = useCurrentPagePath();
|
|
const { data: currentPagePath } = useCurrentPagePath();
|
|
|
|
|
|