import { Providers } from "@/app/providers"; import { Layout } from "@/components/Layout"; import { type Section } from "@/components/SectionProvider"; import "@/styles/tailwind.css"; import glob from "fast-glob"; import { type Metadata } from "next"; import { Jost } from "next/font/google"; export const metadata: Metadata = { title: { template: "%s - Formbricks Docs", default: "Formbricks Documentation", }, }; const jost = Jost({ subsets: ["latin"] }); const RootLayout = async ({ children }: { children: React.ReactNode }) => { let pages = await glob("**/*.mdx", { cwd: "src/app" }); let allSectionsEntries = (await Promise.all( pages.map(async (filename) => [ "/" + filename.replace(/(^|\/)page\.mdx$/, ""), (await import(`./${filename}`)).sections, ]) )) as Array<[string, Array
]>; let allSections = Object.fromEntries(allSectionsEntries); return (
{children}
); }; export default RootLayout;