diff --git a/website/components/Docs/Page.tsx b/website/components/Docs/Page.tsx index 6c2ff4881..81bdc294a 100644 --- a/website/components/Docs/Page.tsx +++ b/website/components/Docs/Page.tsx @@ -50,7 +50,7 @@ const components = { Alert, }; -const useIsomorphicLayoutEffect = typeof window !== 'undefined' ? useLayoutEffect : useEffect; +const useIsomorphicLayoutEffect = typeof window === 'undefined' ? useEffect : useLayoutEffect; export function DocsPage({ children, nav }: { children?: React.ReactNode; nav: TableOfContents }) { const bodyRef = useRef(null);