We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
JSX.Element
ReactNode
1 parent 8e26d21 commit b053e70Copy full SHA for b053e70
src/theme/DocItem/Layout/index.tsx
@@ -1,4 +1,4 @@
1
-import React from 'react';
+import React, {type ReactNode} from 'react';
2
import clsx from 'clsx';
3
import {useWindowSize} from '@docusaurus/theme-common';
4
import {useDoc} from '@docusaurus/plugin-content-docs/client';
@@ -40,7 +40,7 @@ function useDocTOC() {
40
};
41
}
42
43
-export default function DocItemLayout({children}: Props): JSX.Element {
+export default function DocItemLayout({children}: Props): ReactNode {
44
const docTOC = useDocTOC();
45
const {metadata, frontMatter} = useDoc(); // Get the front-matter metadata to check for the `hide_table_of_contents` configuration.
46
const hideTOC = frontMatter.hide_table_of_contents; // Check if the ToC is hidden.
0 commit comments