import React from 'react'; import { Box, space } from '@blockstack/ui'; import { ContentWrapper } from '../content-wrapper'; import { TableOfContents } from '@components/toc'; import { css } from '@styled-system/css'; import { TOC_WIDTH } from '@common/constants'; import { styleOverwrites } from '@components/mdx/styles'; import { border } from '@common/utils'; import { useRouter } from 'next/router'; import dynamic from 'next/dynamic'; const Search = dynamic(() => import('@components/search')); export const MDContents: React.FC = React.memo( ({ pageTop: PageTop = null, headings, children }) => { const router = useRouter(); const isHome = router.pathname === '/'; return ( <> {PageTop && } {children} {!isHome ? ( {headings?.length > 1 ? ( ) : null} ) : null} ); } );