Skip to content

Commit b053e70

Browse files
committed
Change from using JSX.Element to ReactNode
`ReactNode` should be used since it's what Docusaurus is based on.
1 parent 8e26d21 commit b053e70

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/theme/DocItem/Layout/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from 'react';
1+
import React, {type ReactNode} from 'react';
22
import clsx from 'clsx';
33
import {useWindowSize} from '@docusaurus/theme-common';
44
import {useDoc} from '@docusaurus/plugin-content-docs/client';
@@ -40,7 +40,7 @@ function useDocTOC() {
4040
};
4141
}
4242

43-
export default function DocItemLayout({children}: Props): JSX.Element {
43+
export default function DocItemLayout({children}: Props): ReactNode {
4444
const docTOC = useDocTOC();
4545
const {metadata, frontMatter} = useDoc(); // Get the front-matter metadata to check for the `hide_table_of_contents` configuration.
4646
const hideTOC = frontMatter.hide_table_of_contents; // Check if the ToC is hidden.

0 commit comments

Comments
 (0)