rework/lightweight #12
@ -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 />
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user