chatbot-template/app/layout.tsx

53 lines
1.4 KiB
TypeScript

import { Metadata } from 'next'
import '@/app/globals.css'
import { fontMono, fontSans } from '@/lib/fonts'
import { cn } from '@/lib/utils'
import { TailwindIndicator } from '@/components/tailwind-indicator'
import { ThemeProvider } from '@/components/theme-provider'
import { Header } from '@/components/header'
export const metadata: Metadata = {
title: {
default: 'Next.js Chatbot',
template: `%s - Next.js Chatbot`
},
description: 'An AI-powered chatbot built with Next.js and Vercel.',
themeColor: [
{ media: '(prefers-color-scheme: light)', color: 'white' },
{ media: '(prefers-color-scheme: dark)', color: 'black' }
],
icons: {
icon: '/favicon.ico',
shortcut: '/favicon-16x16.png',
apple: '/apple-touch-icon.png'
}
}
interface RootLayoutProps {
children: React.ReactNode
}
export default function RootLayout({ children }: RootLayoutProps) {
return (
<html lang="en" suppressHydrationWarning>
<head />
<body
className={cn(
'font-sans antialiased',
fontSans.variable,
fontMono.variable
)}
>
<ThemeProvider attribute="class" defaultTheme="system" enableSystem>
<div className="h-screen flex flex-col">
{/* @ts-ignore */}
<Header />
<main className="flex-1">{children}</main>
</div>
<TailwindIndicator />
</ThemeProvider>
</body>
</html>
)
}