layout.tsx
2,114 bytes
| 1 | import type { Metadata } from 'next'; |
|---|---|
| 2 | import { JetBrains_Mono, Manrope, Sora } from 'next/font/google'; |
| 3 | import { SiteHeader } from '@/components/site-header'; |
| 4 | import { ThemeProvider } from '@/components/theme-provider'; |
| 5 | import { Toaster } from '@/components/ui/sonner'; |
| 6 | import { TooltipProvider } from '@/components/ui/tooltip'; |
| 7 | import './globals.css'; |
| 8 | |
| 9 | const sans = Manrope({ subsets: ['latin'], variable: '--font-sans', display: 'swap' }); |
| 10 | const mono = JetBrains_Mono({ subsets: ['latin'], variable: '--font-mono', display: 'swap' }); |
| 11 | const display = Sora({ subsets: ['latin'], variable: '--font-display', display: 'swap' }); |
| 12 | |
| 13 | const DESCRIPTION = |
| 14 | 'Ask several leading AI models one question. They challenge each other, improve their answers, and give you one clear verdict with any remaining disagreement.'; |
| 15 | |
| 16 | export const metadata: Metadata = { |
| 17 | metadataBase: new URL(process.env.AUTH_URL || 'http://localhost:3000'), |
| 18 | title: { |
| 19 | default: 'Roundtable | Several AI opinions, one clear verdict', |
| 20 | template: '%s | Roundtable', |
| 21 | }, |
| 22 | description: DESCRIPTION, |
| 23 | applicationName: 'Roundtable', |
| 24 | openGraph: { |
| 25 | title: 'Roundtable | Several AI opinions, one clear verdict', |
| 26 | description: DESCRIPTION, |
| 27 | type: 'website', |
| 28 | siteName: 'Roundtable', |
| 29 | }, |
| 30 | twitter: { |
| 31 | card: 'summary_large_image', |
| 32 | title: 'Roundtable | Several AI opinions, one clear verdict', |
| 33 | description: DESCRIPTION, |
| 34 | }, |
| 35 | }; |
| 36 | |
| 37 | export default function RootLayout({ children }: { children: React.ReactNode }) { |
| 38 | return ( |
| 39 | <html |
| 40 | lang="en" |
| 41 | suppressHydrationWarning |
| 42 | className={`${sans.variable} ${mono.variable} ${display.variable}`} |
| 43 | > |
| 44 | <body className="min-h-screen font-sans antialiased"> |
| 45 | <ThemeProvider attribute="class" defaultTheme="system" enableSystem> |
| 46 | <TooltipProvider delayDuration={200}> |
| 47 | <div className="relative flex min-h-screen flex-col"> |
| 48 | <SiteHeader /> |
| 49 | <main className="flex-1">{children}</main> |
| 50 | </div> |
| 51 | <Toaster /> |
| 52 | </TooltipProvider> |
| 53 | </ThemeProvider> |
| 54 | </body> |
| 55 | </html> |
| 56 | ); |
| 57 | } |
| 58 | |