chatbot-template/app/layout.tsx

63 lines
1.6 KiB
TypeScript
Raw Normal View History

2023-06-16 15:20:42 +04:00
import { Toaster } from 'react-hot-toast'
2023-11-26 12:07:13 -06:00
import { GeistSans } from 'geist/font/sans'
import { GeistMono } from 'geist/font/mono'
2023-06-15 16:07:03 +04:00
import '@/app/globals.css'
2023-06-02 15:33:48 -04:00
import { cn } from '@/lib/utils'
import { TailwindIndicator } from '@/components/tailwind-indicator'
import { Providers } from '@/components/providers'
2023-06-15 16:07:03 +04:00
import { Header } from '@/components/header'
2023-05-19 12:33:56 -04:00
2023-11-26 12:32:01 -06:00
export const metadata = {
2023-11-26 18:30:48 -06:00
metadataBase: new URL(`https://${process.env.VERCEL_URL}`),
2023-05-19 12:33:56 -04:00
title: {
2023-06-16 18:44:10 -04:00
default: 'Next.js AI Chatbot',
template: `%s - Next.js AI Chatbot`
2023-05-19 12:33:56 -04:00
},
2023-06-16 19:14:09 -04:00
description: 'An AI-powered chatbot template built with Next.js and Vercel.',
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
2023-11-26 12:32:01 -06:00
export const viewport = {
themeColor: [
{ media: '(prefers-color-scheme: light)', color: 'white' },
{ media: '(prefers-color-scheme: dark)', color: 'black' }
]
}
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-16 11:49:14 -04:00
<html lang="en" suppressHydrationWarning>
<body
className={cn(
'font-sans antialiased',
2023-11-26 12:07:13 -06:00
GeistSans.variable,
GeistMono.variable
2023-06-16 11:49:14 -04:00
)}
>
<Toaster />
<Providers
attribute="class"
defaultTheme="system"
enableSystem
disableTransitionOnChange
>
2023-06-16 19:14:09 -04:00
<div className="flex flex-col min-h-screen">
2023-06-16 11:49:14 -04:00
<Header />
2023-06-16 19:14:09 -04:00
<main className="flex flex-col flex-1 bg-muted/50">{children}</main>
2023-06-16 11:49:14 -04:00
</div>
<TailwindIndicator />
</Providers>
</body>
</html>
2023-06-02 15:33:48 -04:00
)
2023-05-19 12:33:56 -04:00
}