import { MDXProvider } from '@mdx-js/react' import { NextSeo } from 'next-seo' import Head from 'next/head' import { useRouter } from 'next/router' import { FC, PropsWithChildren } from 'react' import components from '~/components' import TableOfContents from '~/components/TableOfContents' import { MainSkeleton } from './MainSkeleton' interface Props { meta: { title: string description?: string hide_table_of_contents?: boolean video?: string tocVideo?: string canonical?: string } children: any toc?: any menuItems: any } const Layout: FC = (props: Props) => { const { asPath } = useRouter() const hasTableOfContents = props.toc !== undefined && props.toc.json.filter((item) => item.lvl !== 1 && item.lvl <= 3).length > 0 return ( <> {asPath === '/' ? 'Supabase Docs' : `${props.meta?.title} | Supabase Docs`}

{props.meta.title}

{props.children}
{hasTableOfContents && !props.meta?.hide_table_of_contents && ( )}
) } export const LayoutMainContent: FC> = ({ className, children, }) =>
{children}
export default Layout