import { Public_Sans } from 'next/font/google'; import localFont from 'next/font/local'; import { headers } from 'next/headers'; import { ThemeProvider } from '@/components/app/theme-provider'; import { ThemeToggle } from '@/components/app/theme-toggle'; import { cn } from '@/lib/shadcn/utils'; import { getAppConfig, getStyles } from '@/lib/utils'; import '@/styles/globals.css'; const publicSans = Public_Sans({ variable: '--font-public-sans', subsets: ['latin'], }); const commitMono = localFont({ display: 'swap', variable: '--font-commit-mono', src: [ { path: '../fonts/CommitMono-400-Regular.otf', weight: '400', style: 'normal', }, { path: '../fonts/CommitMono-700-Regular.otf', weight: '700', style: 'normal', }, { path: '../fonts/CommitMono-400-Italic.otf', weight: '400', style: 'italic', }, { path: '../fonts/CommitMono-700-Italic.otf', weight: '700', style: 'italic', }, ], }); interface RootLayoutProps { children: React.ReactNode; } export default async function RootLayout({ children }: RootLayoutProps) { const hdrs = await headers(); const appConfig = await getAppConfig(hdrs); const styles = getStyles(appConfig); const { pageTitle, pageDescription, companyName, logo, logoDark } = appConfig; return (
{styles && }