discord-clone/app/layout.tsx

40 lines
966 B
TypeScript
Raw Permalink Normal View History

2023-09-04 19:53:50 -07:00
import './globals.css'
import type { Metadata } from 'next'
2023-10-07 12:44:05 -07:00
import { Open_Sans } from 'next/font/google'
2023-10-07 13:10:50 -07:00
import { ClerkProvider } from '@clerk/nextjs'
2023-10-07 13:33:09 -07:00
import { ThemeProvider } from '@/components/providers/theme-provider'
2023-10-08 01:34:41 -07:00
import { cn } from '@/lib/utils'
2023-09-04 19:53:50 -07:00
2023-10-07 12:44:05 -07:00
const Font = Open_Sans({ subsets: ['latin'] })
2023-09-04 19:53:50 -07:00
export const metadata: Metadata = {
2023-10-07 12:44:05 -07:00
title: 'Discord-Clone',
2023-09-04 19:53:50 -07:00
description: 'Generated by create next app',
}
export default function RootLayout({
children,
}: {
children: React.ReactNode
}) {
return (
2023-10-07 13:10:50 -07:00
<ClerkProvider>
2023-10-07 13:33:09 -07:00
<html lang="en" suppressHydrationWarning>
2023-10-08 01:34:41 -07:00
<body className={cn(
Font.className,
"bg-white dark:bg-[#313338]"
)}>
2023-10-07 13:33:09 -07:00
<ThemeProvider
attribute='class'
defaultTheme='dark'
enableSystem={false}
storageKey='discord-theme'
2023-10-08 01:34:41 -07:00
>
{children}
2023-10-07 13:33:09 -07:00
</ThemeProvider>
</body>
2023-10-07 13:10:50 -07:00
</html>
</ClerkProvider>
2023-09-04 19:53:50 -07:00
)
}