Skip to content

Commit 3203af4

Browse files
committed
chore(docs): Disable TOCs in dev mode and use temporary layout
1 parent 78b7396 commit 3203af4

2 files changed

Lines changed: 9 additions & 6 deletions

File tree

packages/documentation/src/components/Layout/Layout.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,11 @@ const icons: ConfiguredIcons = {
6464

6565
let devLayoutConf: LayoutConfiguration | undefined;
6666
if (process.env.NODE_ENV !== "production") {
67-
// devLayoutConf = {
68-
// landscapeTabletLayout: "temporary",
69-
// desktopLayout: "temporary",
70-
// largeDesktopLayout: "temporary",
71-
// };
67+
devLayoutConf = {
68+
landscapeTabletLayout: "temporary",
69+
desktopLayout: "temporary",
70+
largeDesktopLayout: "temporary",
71+
};
7272
}
7373

7474
export default function Layout({

packages/documentation/src/components/TableOfContents/VisibilityContext.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,10 @@ export function TOCVisibilityProvider({
5959
// eslint-disable-next-line react-hooks/exhaustive-deps
6060
}, [isLargeDesktop]);
6161

62-
const rendered = !!tocs[pathname]?.length;
62+
// I get SSR errors in dev mode since I normally have the dev tools open which
63+
// results in different app sizes
64+
const rendered =
65+
!!tocs[pathname]?.length && process.env.NODE_ENV === "production";
6366
const actions = useMemo(() => ({ show, hide, toggle }), [hide, show, toggle]);
6467
const visibility = useMemo(
6568
() => ({

0 commit comments

Comments
 (0)