mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-22 20:47:53 +02:00
refactor: unify export directive style (#6751)
This commit is contained in:
parent
0c807b3501
commit
0d14470d54
105 changed files with 315 additions and 510 deletions
|
@ -12,7 +12,7 @@ import DebugJsonView from '@theme/DebugJsonView';
|
|||
|
||||
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
||||
|
||||
function DebugMetadata(): JSX.Element {
|
||||
export default function DebugMetadata(): JSX.Element {
|
||||
const {siteConfig} = useDocusaurusContext();
|
||||
return (
|
||||
<DebugLayout>
|
||||
|
@ -21,5 +21,3 @@ function DebugMetadata(): JSX.Element {
|
|||
</DebugLayout>
|
||||
);
|
||||
}
|
||||
|
||||
export default DebugMetadata;
|
||||
|
|
|
@ -54,7 +54,7 @@ function PluginContent({
|
|||
);
|
||||
}
|
||||
|
||||
function DebugContent({allContent}: Props): JSX.Element {
|
||||
export default function DebugContent({allContent}: Props): JSX.Element {
|
||||
return (
|
||||
<DebugLayout>
|
||||
<h2>Plugin content</h2>
|
||||
|
@ -77,5 +77,3 @@ function DebugContent({allContent}: Props): JSX.Element {
|
|||
</DebugLayout>
|
||||
);
|
||||
}
|
||||
|
||||
export default DebugContent;
|
||||
|
|
|
@ -11,7 +11,7 @@ import DebugLayout from '@theme/DebugLayout';
|
|||
import DebugJsonView from '@theme/DebugJsonView';
|
||||
import useGlobalData from '@docusaurus/useGlobalData';
|
||||
|
||||
function DebugMetadata(): JSX.Element {
|
||||
export default function DebugMetadata(): JSX.Element {
|
||||
const globalData = useGlobalData();
|
||||
return (
|
||||
<DebugLayout>
|
||||
|
@ -20,5 +20,3 @@ function DebugMetadata(): JSX.Element {
|
|||
</DebugLayout>
|
||||
);
|
||||
}
|
||||
|
||||
export default DebugMetadata;
|
||||
|
|
|
@ -27,7 +27,10 @@ function BrowserOnlyReactJson(props: ReactJsonViewProps) {
|
|||
);
|
||||
}
|
||||
|
||||
function DebugJsonView({src, collapseDepth}: Props): JSX.Element {
|
||||
export default function DebugJsonView({
|
||||
src,
|
||||
collapseDepth,
|
||||
}: Props): JSX.Element {
|
||||
return (
|
||||
<BrowserOnlyReactJson
|
||||
src={src as object}
|
||||
|
@ -52,5 +55,3 @@ function DebugJsonView({src, collapseDepth}: Props): JSX.Element {
|
|||
/>
|
||||
);
|
||||
}
|
||||
|
||||
export default DebugJsonView;
|
||||
|
|
|
@ -25,7 +25,11 @@ function DebugNavLink({to, children}: {to: string; children: ReactNode}) {
|
|||
);
|
||||
}
|
||||
|
||||
function DebugLayout({children}: {children: ReactNode}): JSX.Element {
|
||||
export default function DebugLayout({
|
||||
children,
|
||||
}: {
|
||||
children: ReactNode;
|
||||
}): JSX.Element {
|
||||
return (
|
||||
<>
|
||||
<Head>
|
||||
|
@ -53,5 +57,3 @@ function DebugLayout({children}: {children: ReactNode}): JSX.Element {
|
|||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export default DebugLayout;
|
||||
|
|
|
@ -11,7 +11,7 @@ import DebugLayout from '@theme/DebugLayout';
|
|||
import registry from '@generated/registry';
|
||||
import styles from './styles.module.css';
|
||||
|
||||
function DebugRegistry(): JSX.Element {
|
||||
export default function DebugRegistry(): JSX.Element {
|
||||
return (
|
||||
<DebugLayout>
|
||||
<h2>Registry</h2>
|
||||
|
@ -30,5 +30,3 @@ function DebugRegistry(): JSX.Element {
|
|||
</DebugLayout>
|
||||
);
|
||||
}
|
||||
|
||||
export default DebugRegistry;
|
||||
|
|
|
@ -12,7 +12,7 @@ import DebugJsonView from '@theme/DebugJsonView';
|
|||
import routes from '@generated/routes';
|
||||
import styles from './styles.module.css';
|
||||
|
||||
function DebugRoutes(): JSX.Element {
|
||||
export default function DebugRoutes(): JSX.Element {
|
||||
return (
|
||||
<DebugLayout>
|
||||
<h2>Routes</h2>
|
||||
|
@ -37,5 +37,3 @@ function DebugRoutes(): JSX.Element {
|
|||
</DebugLayout>
|
||||
);
|
||||
}
|
||||
|
||||
export default DebugRoutes;
|
||||
|
|
|
@ -11,7 +11,7 @@ import DebugLayout from '@theme/DebugLayout';
|
|||
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
||||
import styles from './styles.module.css';
|
||||
|
||||
function DebugMetadata(): JSX.Element {
|
||||
export default function DebugMetadata(): JSX.Element {
|
||||
const {siteMetadata} = useDocusaurusContext();
|
||||
return (
|
||||
<DebugLayout>
|
||||
|
@ -43,5 +43,3 @@ function DebugMetadata(): JSX.Element {
|
|||
</DebugLayout>
|
||||
);
|
||||
}
|
||||
|
||||
export default DebugMetadata;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue