chatbot-template/app/layout.tsx

54 lines
1.4 KiB
TypeScript
Raw Normal View History

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