refactor: unify export directive style (#6751)

This commit is contained in:
Joshua Chen 2022-02-24 17:25:17 +08:00 committed by GitHub
parent 0c807b3501
commit 0d14470d54
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
105 changed files with 315 additions and 510 deletions

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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;