style: Remove unnecessary comments and code duplication

This commit is contained in:
Gauthier Daniels 2025-04-20 16:39:42 +02:00
parent 529ca5d5bd
commit e2ad0bb5f9

View File

@ -1,5 +1,6 @@
import type { JSXElement } from "solid-js"; import type { JSXElement } from "solid-js";
import { TableOfContents } from "@/partials/TableOfContents";
import { PrevNextLinks } from "@/components/PrevNextLinks"; import { PrevNextLinks } from "@/components/PrevNextLinks";
import { usePageContext } from "vike-solid/usePageContext"; import { usePageContext } from "vike-solid/usePageContext";
import { clientOnly } from "vike-solid/clientOnly"; import { clientOnly } from "vike-solid/clientOnly";
@ -12,9 +13,9 @@ type DocsLayoutProps = {
children: JSXElement; children: JSXElement;
}; };
const TableOfContents = clientOnly(() => // const TableOfContents = clientOnly(() =>
import("@/partials/TableOfContents").then((m) => m.TableOfContents), // import("@/partials/TableOfContents").then((m) => m.TableOfContents),
); // );
export function DocsLayout(props: DocsLayoutProps) { export function DocsLayout(props: DocsLayoutProps) {
const pageContext = usePageContext(); const pageContext = usePageContext();
@ -32,7 +33,7 @@ export function DocsLayout(props: DocsLayoutProps) {
<PrevNextLinks /> <PrevNextLinks />
</div> </div>
<TableOfContents fallback={null} /> <TableOfContents />
</> </>
); );
} }