chatbot-template/app/layout.tsx

60 lines
1.6 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
2023-06-15 16:07:03 +04:00
import { ClerkProvider } from '@clerk/nextjs'
2023-06-16 15:20:42 +04:00
import { Toaster } from 'react-hot-toast'
2023-06-15 16:07:03 +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 { 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
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-13 17:31:15 -04:00
<ClerkProvider>
<html lang="en" suppressHydrationWarning>
<head />
<body
className={cn(
'font-sans antialiased',
fontSans.variable,
fontMono.variable
)}
>
2023-06-16 15:20:42 +04:00
<Toaster />
<Providers attribute="class" defaultTheme="system" enableSystem>
2023-06-15 16:07:03 +04:00
<div className="flex min-h-screen flex-col">
{/* @ts-ignore */}
<Header />
<main className="flex-1 bg-muted/50">{children}</main>
</div>
2023-06-13 17:31:15 -04:00
<TailwindIndicator />
</Providers>
2023-06-13 17:31:15 -04:00
</body>
</html>
</ClerkProvider>
2023-06-02 15:33:48 -04:00
)
2023-05-19 12:33:56 -04:00
}