sourcebot/src/app/layout.tsx

44 lines
1.3 KiB
TypeScript
Raw Normal View History

2024-08-23 20:54:13 +00:00
import type { Metadata } from "next";
import { Inter } from "next/font/google";
import "./globals.css";
2024-08-27 03:54:15 +00:00
import { ThemeProvider } from "next-themes";
2024-08-31 03:00:58 +00:00
import { Suspense } from "react";
2024-08-23 20:54:13 +00:00
const inter = Inter({ subsets: ["latin"] });
export const metadata: Metadata = {
2024-08-28 19:06:00 +00:00
title: "Sourcebot",
description: "Sourcebot",
2024-08-23 20:54:13 +00:00
};
export default function RootLayout({
2024-08-27 03:54:15 +00:00
children,
2024-08-23 20:54:13 +00:00
}: Readonly<{
2024-08-27 03:54:15 +00:00
children: React.ReactNode;
2024-08-23 20:54:13 +00:00
}>) {
2024-08-27 03:54:15 +00:00
return (
<html
lang="en"
// @see : https://github.com/pacocoursey/next-themes?tab=readme-ov-file#with-app
suppressHydrationWarning
>
<body className={inter.className}>
<ThemeProvider
attribute="class"
defaultTheme="system"
enableSystem
disableTransitionOnChange
>
2024-08-31 03:00:58 +00:00
{/*
@todo : ideally we don't wrap everything in a suspense boundary.
@see : https://nextjs.org/docs/messages/missing-suspense-with-csr-bailout
*/}
<Suspense>
{children}
</Suspense>
2024-08-27 03:54:15 +00:00
</ThemeProvider>
</body>
</html>
);
2024-08-23 20:54:13 +00:00
}